How to retrieve an MP4 URL from Stream

Prerequisites

  • You must have a Video Library created.
  • You must have MP4 Fallback enabled under the encoding tab of the created video library.
  • Only videos uploaded after the enabling of the MP4 Fallback will generate the MP4. Please keep in mind that the fallbacks go up to a maximum of 720P in quality if the original permits.
  • In addition to the above, we do not upscale videos. A 720P fallback for example cannot be generated if the maximum quality of the original video is 480P.

How to retrieve the MP4 URL?

If all of the above conditions have been met, you can construct an MP4 URL following this pattern;

https://{pull_zone_url}.b-cdn.net/{video_id}/play_{resolution_height}p.mp4

When creating the following URL, we must keep in mind that the fallbacks go up only to 720p and as such, any higher resolution, for example, 1080p, will yield a 404 error because it doesn't exist.

A finalized link should look like the following;

https://vz-123412341234.b-cdn.net/1234-1234-1234-1234-123412341234/play_720p.mp4

Useful tip

Don't want to go through the tedious process of constructing a URL? If that's the case, then you can simply copy the HLS URL from your video card and replace playlist.m3u8 at the end of the URL with your preferred fallback option. An example can be found below;

 

HLSVidPlaylist.png

https://vz-123412341234.b-cdn.net/1234-1234-1234-1234-123412341234/playlist.m3u8

Would become the following;

https://vz-123412341234.b-cdn.net/1234-1234-1234-1234-123412341234/play_720p.mp4

Table of Contents

Was this article helpful?
12 out of 23 found this helpful