From 8f8f173c92cd271a15192d15dc4662ab1ac82f6e Mon Sep 17 00:00:00 2001 From: Pakhi Sinha Date: Fri, 11 Jul 2025 15:52:13 -0500 Subject: [PATCH 1/5] 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 00000000000000..9c58cc7591a61c --- /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 26658992d241f7..94522294c18e65 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/5] 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 9c58cc7591a61c..fdd5ebecac2c82 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/5] 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 fdd5ebecac2c82..3b8110c5a309aa 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/5] 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 94522294c18e65..7abb2000b7457a 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/5] 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 7abb2000b7457a..b6c6496eb3a8b5 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`