From 8f8f173c92cd271a15192d15dc4662ab1ac82f6e Mon Sep 17 00:00:00 2001 From: Pakhi Sinha Date: Fri, 11 Jul 2025 15:52:13 -0500 Subject: [PATCH 1/8] Media Transformations Audio Mode --- ...07-11-media-transformations-audio-mode.mdx | 19 +++++++++++++++++++ .../docs/stream/transform-videos/index.mdx | 13 ++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx diff --git a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx b/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx new file mode 100644 index 000000000000000..9c58cc7591a61ce --- /dev/null +++ b/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx @@ -0,0 +1,19 @@ +--- +title: Audio mode for Media Transforamtions +description: > + Media Transformations now supports `audio` mode, which extracts audio from a video. +date: ... +--- + +The addition of this feature allows a user to extract audio from a source video, outputting +an M4A file. This means you can ..... (why did we build this?) + +For example, + +``` text title="Example URL" +https://example.com/cdn-cgi/media// +https://example.com/cdn-cgi/media/mode=audio,time=3s,duration=5s/ +``` + + +For more information, learn about [Transforming Videos](/stream/transform-videos/). diff --git a/src/content/docs/stream/transform-videos/index.mdx b/src/content/docs/stream/transform-videos/index.mdx index 26658992d241f75..94522294c18e650 100644 --- a/src/content/docs/stream/transform-videos/index.mdx +++ b/src/content/docs/stream/transform-videos/index.mdx @@ -54,12 +54,13 @@ Specifies the kind of output to generate. - `video`: Outputs an H.264/AAC optimized MP4 file. - `frame`: Outputs a still image. - `spritesheet`: Outputs a JPEG with multiple frames. +- `audio`: Outputs an AAC optimized M4A file. ### `time` Specifies when to start extracting the output in the input file. Depends on `mode`: -- When `mode` is `spritesheet` or `video`, specifies the timestamp where the output will start. +- When `mode` is `spritesheet`, `video`, or `audio`, specifies the timestamp where the output will start. - When `mode` is `frame`, specifies the timestamp from which to extract the still image. - Formats as a time string, for example: 5s, 2m - Acceptable range: 0 – 30s @@ -69,7 +70,7 @@ Specifies when to start extracting the output in the input file. Depends on `mod The duration of the output video or spritesheet. Depends on `mode`: -- When `mode` is `video`, specifies the duration of the output. +- When `mode` is `video` or `audio`, specifies the duration of the output. - When `mode` is `spritesheet`, specifies the time range from which to select frames. - Acceptable range: 1s - 60s (or 1m) - Default: input duration or 30 seconds, whichever is shorter @@ -102,12 +103,18 @@ When `mode` is `video`, specifies whether or not to include the source audio in - `false`: Output will be silent. - Default: `true` +However, When `mode` is `audio`, audio cannot be false. + ### `format` If `mode` is `frame`, specifies the image output format. - Acceptable options: `jpg`, `png` +If `mode` is `audio`, specifies the audio output format. + +- Acceptable options: `m4a` (default) + ## Source video requirements Input video must be less than 100MB. @@ -129,6 +136,6 @@ Media Transformations will be free for all customers while in beta. After that, Media Transforamtions and Image Transformations will use the same subscriptions and usage metrics. - Generating a still frame (single image) from a video counts as 1 transformation. -- Generating an optimized video counts as 1 transformation _per second of the output_ video. +- Generating an optimized video or extracting audio counts as 1 transformation _per second of the output_ content. - Each unique transformation is only billed once per month. - All Media and Image Transformations cost $0.50 per 1,000 monthly unique transformation operations, with a free monthly allocation of 5,000. From e64b184e5d9af7916b45db24dbd91264a798c9b6 Mon Sep 17 00:00:00 2001 From: Pakhi <119137897+imakelaa@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:26:43 -0500 Subject: [PATCH 2/8] Update src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx Co-authored-by: Taylor Smith --- .../stream/2025-07-11-media-transformations-audio-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx b/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx index 9c58cc7591a61ce..fdd5ebecac2c82f 100644 --- a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx +++ b/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx @@ -6,7 +6,7 @@ date: ... --- The addition of this feature allows a user to extract audio from a source video, outputting -an M4A file. This means you can ..... (why did we build this?) +an M4A file to use in downstream workflows like AI inference, content moderation, or transcription. For example, From c8c80b0af330f0461111eeca02df810a8142c093 Mon Sep 17 00:00:00 2001 From: Pakhi <119137897+imakelaa@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:26:49 -0500 Subject: [PATCH 3/8] Update src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx Co-authored-by: Taylor Smith --- .../stream/2025-07-11-media-transformations-audio-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx b/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx index fdd5ebecac2c82f..3b8110c5a309aaf 100644 --- a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx +++ b/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx @@ -12,7 +12,7 @@ For example, ``` text title="Example URL" https://example.com/cdn-cgi/media// -https://example.com/cdn-cgi/media/mode=audio,time=3s,duration=5s/ +https://example.com/cdn-cgi/media/mode=audio,time=3s,duration=60s/ ``` From 9e191af602a89573f7885a8405ae04593a90a4c3 Mon Sep 17 00:00:00 2001 From: Pakhi <119137897+imakelaa@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:27:05 -0500 Subject: [PATCH 4/8] Update src/content/docs/stream/transform-videos/index.mdx Co-authored-by: Taylor Smith --- src/content/docs/stream/transform-videos/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/stream/transform-videos/index.mdx b/src/content/docs/stream/transform-videos/index.mdx index 94522294c18e650..7abb2000b7457a6 100644 --- a/src/content/docs/stream/transform-videos/index.mdx +++ b/src/content/docs/stream/transform-videos/index.mdx @@ -54,7 +54,7 @@ Specifies the kind of output to generate. - `video`: Outputs an H.264/AAC optimized MP4 file. - `frame`: Outputs a still image. - `spritesheet`: Outputs a JPEG with multiple frames. -- `audio`: Outputs an AAC optimized M4A file. +- `audio`: Outputs an AAC encoded M4A file. ### `time` From 6b4a7726d4871a1cbf3dc1786be0640e83e0b2d0 Mon Sep 17 00:00:00 2001 From: Pakhi <119137897+imakelaa@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:27:13 -0500 Subject: [PATCH 5/8] Update src/content/docs/stream/transform-videos/index.mdx Co-authored-by: Taylor Smith --- src/content/docs/stream/transform-videos/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/stream/transform-videos/index.mdx b/src/content/docs/stream/transform-videos/index.mdx index 7abb2000b7457a6..b6c6496eb3a8b52 100644 --- a/src/content/docs/stream/transform-videos/index.mdx +++ b/src/content/docs/stream/transform-videos/index.mdx @@ -103,7 +103,7 @@ When `mode` is `video`, specifies whether or not to include the source audio in - `false`: Output will be silent. - Default: `true` -However, When `mode` is `audio`, audio cannot be false. +When `mode` is `audio`, audio cannot be false. ### `format` From 902f6b8990971e4b27edbb22c3e8ddcc1ef7ef4c Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Tue, 22 Jul 2025 11:54:06 -0500 Subject: [PATCH 6/8] Roll forward changelog date --- ...x => 2025-07-22-media-transformations-audio-mode.mdx} | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) rename src/content/changelog/stream/{2025-07-11-media-transformations-audio-mode.mdx => 2025-07-22-media-transformations-audio-mode.mdx} (84%) diff --git a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx b/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx similarity index 84% rename from src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx rename to src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx index 3b8110c5a309aaf..07b810af773e3d1 100644 --- a/src/content/changelog/stream/2025-07-11-media-transformations-audio-mode.mdx +++ b/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx @@ -1,19 +1,18 @@ --- -title: Audio mode for Media Transforamtions +title: Audio mode for Media Transforamtions description: > Media Transformations now supports `audio` mode, which extracts audio from a video. -date: ... +date: 2025-07-22 --- -The addition of this feature allows a user to extract audio from a source video, outputting +The addition of this feature allows a user to extract audio from a source video, outputting an M4A file to use in downstream workflows like AI inference, content moderation, or transcription. -For example, +For example, ``` text title="Example URL" https://example.com/cdn-cgi/media// https://example.com/cdn-cgi/media/mode=audio,time=3s,duration=60s/ ``` - For more information, learn about [Transforming Videos](/stream/transform-videos/). From ac8c3e05104fcbfa8d5dd5eebb5a3627c796875d Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Tue, 22 Jul 2025 23:46:00 -0500 Subject: [PATCH 7/8] [Stream] Kody suggestions --- .../stream/2025-07-22-media-transformations-audio-mode.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx b/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx index 07b810af773e3d1..1024ad71a804f4e 100644 --- a/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx +++ b/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx @@ -5,8 +5,8 @@ description: > date: 2025-07-22 --- -The addition of this feature allows a user to extract audio from a source video, outputting -an M4A file to use in downstream workflows like AI inference, content moderation, or transcription. +We now support `audio` mode! Use this feature to extract audio from a source video, outputting +an M4A file to use in downstream workflows like [AI inference](/workers-ai/), content moderation, or transcription. For example, From c67a5b69c416746f72716c2a953f4736fb884648 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Thu, 24 Jul 2025 15:59:09 -0500 Subject: [PATCH 8/8] Spelling fix --- .../stream/2025-07-22-media-transformations-audio-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx b/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx index 1024ad71a804f4e..c7b16b6e1a681b2 100644 --- a/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx +++ b/src/content/changelog/stream/2025-07-22-media-transformations-audio-mode.mdx @@ -1,5 +1,5 @@ --- -title: Audio mode for Media Transforamtions +title: Audio mode for Media Transformations description: > Media Transformations now supports `audio` mode, which extracts audio from a video. date: 2025-07-22