You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/stream/viewing-videos/download-videos.mdx
+55-12Lines changed: 55 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,49 @@
1
1
---
2
-
title: Download videos
2
+
title: Download video or audio
3
3
pcx_content_type: how-to
4
4
sidebar:
5
5
order: 6
6
6
---
7
7
8
-
When you upload a video to Stream, it can be streamed using HLS/DASH. However, for certain use-cases (such as offline viewing), you may want to download the MP4. You can enable MP4 support on a per video basis by following the steps below:
8
+
When you upload a video to Stream, it can be streamed using HLS/DASH. However, for certain use-cases, you may want to download the MP4 or M4A file.
9
+
For cases such as offline viewing, you may want to download the MP4 file. Whereas, for downstream tasks like AI summarization, if you want to extract only the audio, downloading an M4A file may be more useful.
9
10
10
-
1. Enable MP4 support by making a POST request to the `/downloads` endpoint (example below)
11
-
2. Save the MP4 URL provided by the response to the `/downloads` endpoint. This MP4 URL will become functional when the MP4 is ready in the next step.
12
-
3. Poll the `/downloads `endpoint until the `status` field is set to `ready` to inform you when the MP4 is available. You can now use the MP4 URL from step 2.
11
+
## Generate downloadable MP4 files
13
12
14
-
## Generate downloadable files
13
+
:::note
14
+
The `/downloads` endpoint defaults to creating an MP4 download.
15
+
:::
15
16
16
-
You can enable downloads for an uploaded video once it is ready to view by making an HTTP request to the `/downloads` endpoint.
17
+
You can enable MP4 support on a per video basis by following the steps below:
18
+
19
+
1. Enable MP4 support by making a POST request to the `/downloads` or `/downloads/default` endpoint.
20
+
2. Save the MP4 URL provided by the response to the endpoint. This MP4 URL will become functional when the MP4 is ready in the next step.
21
+
3. Poll the `/downloads` endpoint until the `status` field is set to `ready` to inform you when the MP4 is available. You can now use the MP4 URL from step 2.
22
+
23
+
You can enable downloads for an uploaded video once it is ready to view by making an HTTP request to either the `/downloads` or `/downloads/default` endpoint.
17
24
18
25
To get notified when a video is ready to view, refer to [Using webhooks](/stream/manage-video-library/using-webhooks/#notifications).
19
26
20
-
The downloads API response will include all available download types for the video, the download URL for each type, and the processing status of the download file.
27
+
## Generate downloadable M4A files
21
28
22
-
```bash title="Request"
29
+
To enable M4A support on a per video basis, follow steps similar to that of generating an MP4 download, but instead send a POST request to the `/downloads/audio` endpoint.
30
+
31
+
## Examples
32
+
33
+
The downloads API response will include download type for the video, the download URL, and the processing status of the download file.
34
+
35
+
Separate requests would be needed to generate a downloadable MP4 and M4A file, respectively. For example:
You can view all available downloads for a video by making a `GET` HTTP request to the downloads API. The response for creating and fetching downloads are the same.
83
+
You can view all available downloads for a video by making a `GET` HTTP request to the downloads API.
0 commit comments