This blog shows a tutorial about how to download any Azure media service video or live stream.

Before starting, you need to have FFmpeg installed. No matter you are using Windows, Linux, or Mac OS.

Download latest FFmpeg here: https://ffmpeg.org/download.html

After installing it, prepare a command:

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "{0}" -c copy video.mp4

And you need to get the Azure Media Service smooth streaming URL of the video you are watching. Typically, this URL ends with 'manifest'.

For example, it might be:

https://amssamples.streaming.mediaservices.windows.net/3b970ae0-39d5-44bd-b3a3-3136143d6435/AzureMediaServicesPromo.ism/manifest

To download this, first, append it to be an m3u8 format. Append the following item to the end of the URL.

(format=m3u8-aapl-v3)

Now the URL shall be like:

https://amssamples.streaming.mediaservices.windows.net/3b970ae0-39d5-44bd-b3a3-3136143d6435/AzureMediaServicesPromo.ism/manifest(format=m3u8-aapl-v3)

And now replace the URL with {0} to the command in the first step.

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "https://yourdomain/manifest(format=m3u8-aapl-v3)" -c copy video.mp4

And now, execute the command you generated. And your video will just download as file: video.mp4.