@transcodely/sdk 0.3.9 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ All notable changes to the Transcodely JavaScript / TypeScript SDK will be docum
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Breaking changes are allowed on minor bumps until 1.0.0.
6
6
 
7
+ ## [0.3.11](https://github.com/transcodely/transcodely-js/compare/v0.3.10...v0.3.11) (2026-10-25)
8
+
9
+
10
+ ### Features
11
+
12
+ * transcripts & insights surface (proto sync) ([#77](https://github.com/transcodely/transcodely-js/issues/77)) ([554a81f](https://github.com/transcodely/transcodely-js/commit/554a81f80d0360d81c7e5670c45b6c49ea57f2e1))
13
+
14
+ ## [0.3.10](https://github.com/transcodely/transcodely-js/compare/v0.3.9...v0.3.10) (2026-09-22)
15
+
16
+
17
+ ### Features
18
+
19
+ * **proto:** per-title search curve — seed_crf, met_target, probes (api 5.23.0) ([#74](https://github.com/transcodely/transcodely-js/issues/74)) ([62deaf2](https://github.com/transcodely/transcodely-js/commit/62deaf2d94fd01af0982a93f5de8d85da04a87a3))
20
+
7
21
  ## [0.3.9](https://github.com/transcodely/transcodely-js/compare/v0.3.8...v0.3.9) (2026-09-15)
8
22
 
9
23
 
package/README.md CHANGED
@@ -175,6 +175,19 @@ on its samples, and the CRF it chose. It describes the SEARCH, not the delivered
175
175
  file — `vmafAchieved` scores short samples taken before the real encode, which is
176
176
  never scored itself. It is `undefined` on every ordinary output.
177
177
 
178
+ It also carries the whole curve the search measured: `seedCrf` (the CRF the
179
+ rung would have used without per-title — compare it with `crfChosen` to see
180
+ what changed), `metTarget` (whether the search reached `vmafTarget`; `false`
181
+ means `crfChosen` is only the best-scoring point it measured), and `probes[]`
182
+ (`OutputReportContentAwareProbe[]`, one entry per sample the search measured,
183
+ in order — each with `crf`, `vmaf`, and `bitrateKbps`). Two probes' bitrates
184
+ compare directly since every sample is the same cut of the source, so the
185
+ ratio between the `seedCrf` probe and the `crfChosen` probe is the honest
186
+ per-title saving on that sample. `bitrateKbps` is the sample's VIDEO-ONLY
187
+ bitrate — the search's cuts drop audio, subtitles and data — so don't compare
188
+ it to a delivered output's muxed `averageBitrateKbps`. All three fields are
189
+ `undefined`/empty on reports from workers older than 1.29.0.
190
+
178
191
  ## AI captions
179
192
 
180
193
  Add auto-generated captions to any output with a `generate` subtitle track.
@@ -214,6 +227,56 @@ for (const fee of job.fees) {
214
227
  }
215
228
  ```
216
229
 
230
+ ## Transcripts and insights
231
+
232
+ Every `generate` track also writes the transcript as `json`, `txt` and `md`.
233
+ Ask for the opt-in insights pass (summary, key points, chapters, questions,
234
+ terms, highlights) on the same track:
235
+
236
+ ```ts
237
+ import { SubtitleOperation, TranscriptStyle, TranscriptFormat, InsightsStatus } from "@transcodely/sdk";
238
+
239
+ await client.jobs.create({
240
+ inputVideoId: "vid_a1b2c3d4e5f6g7",
241
+ outputs: [{
242
+ subtitleTracks: [{
243
+ operation: SubtitleOperation.GENERATE,
244
+ transcript: { style: TranscriptStyle.CLEAN }, // default; LITERAL keeps fillers
245
+ insights: { enabled: true, hint: "conference talk for developers" },
246
+ }],
247
+ }],
248
+ });
249
+
250
+ // On a hosted video each rendition carries a short-lived signedUrl, re-issued
251
+ // on every read, so fetch the video right before downloading.
252
+ const video = await client.videos.get("vid_a1b2c3d4e5f6g7");
253
+ const txt = video.textTracks
254
+ .flatMap((t) => t.transcriptRenditions)
255
+ .find((r) => r.format === TranscriptFormat.TXT);
256
+ if (txt?.signedUrl) {
257
+ const transcript = await (await fetch(txt.signedUrl)).text();
258
+ console.log(transcript);
259
+ }
260
+
261
+ for (const ins of video.insights) {
262
+ if (ins.status === InsightsStatus.READY) {
263
+ console.log(ins.summary, ins.keyPoints);
264
+ for (const ch of ins.chapters) console.log(ch.startSeconds, ch.title);
265
+ }
266
+ }
267
+
268
+ // Ready-to-paste JSON-LD, video-sitemap entry and HTML fragment for your own page.
269
+ const kit = await client.videos.getSeoMarkup({
270
+ videoId: "vid_a1b2c3d4e5f6g7",
271
+ watchUrl: "https://example.com/watch/42",
272
+ });
273
+ console.log(kit.jsonLd, kit.sitemapEntry, kit.htmlFragment);
274
+ ```
275
+
276
+ Jobs carry the same data on `job.subtitleResults[i].transcriptRenditions` and
277
+ `job.insights`. The `job.insights.ready` and `job.insights.failed` webhook events
278
+ tell you when an insights pass finishes.
279
+
217
280
  ## Authentication
218
281
 
219
282
  Pass your API key in the constructor:
@@ -227,7 +290,7 @@ const client = new Transcodely({ apiKey: process.env.TRANSCODELY_API_KEY! });
227
290
  ```ts
228
291
  client.jobs // create / get / list / cancel / confirm / watch
229
292
  client.uploads // putFile — the whole create / PUT / complete upload, for a path, Blob or stream
230
- client.videos // upload RPCs, multipart, createFromUrl, get / list / update / delete / watch / getStats / listTopVideos
293
+ client.videos // upload RPCs, multipart, createFromUrl, get / list / update / delete / watch / getStats / listTopVideos / getSeoMarkup
231
294
  client.presets // create / get / getBySlug / list / update / duplicate / archive
232
295
  client.origins // create / get / list / update / validate / archive
233
296
  client.ingestRules // create / get / list / update / delete / listEvents / test / replayEvent