This article describes the VOD protocols supported by StackCDN.
VOD is a general term used to describe streaming of static video files.
A static video file is a pre-recorded file on-disk, rather than a live broadcast of a webcam or tv channel.

StackCDN supports two main ways to deliver VOD content.

  1. Origin Mode – where the customer has pre-prepared content on their origin server, already packaged into their required format
  2. Transmuxing Mode – where the customer has MP4 (H.264/AAC) files which they want to transmux (convert in real-time) to other formats

Regardless of which option is required, the setup procedure is the same as any other Object Delivery site. Just set the origin server to the server which contains your video files.

Origin Mode

CDN will cache the files from your origin server and won’t modify them at all.

This method is the simplest form of streaming, and is in fact no different than serving any other file over HTTP.

usage: html5 and direct viewing in application (ios/android/quicktime/vlc etc)

cdn-side requirements: none (standard http requests)

origin-side requirements: none (standard http requests)

video preparation: place the ‘moov’ atom at the beginning of the file

multi-bitrate: encode in several bitrates, allow selection through html5 or flash player

seeking/scrubbing: http-range

streaming: rate limiting

hotlink protection: control panel settings and encrypted links

formats: OGV, MP4, WEBM, and most other formats

This method is the method traditionally used by flash/swf players.

usage: Flash/SWF players

cdn-side requirements: support for ?start= querystring

origin-side requirements: support for ?start= querystring (used for un-cached/new files)

video preparation: place the ‘moov’ atom at the beginning of the file

multi-bitrate: encode in several bitrates, allow selection through flash player

seeking/scrubbing: ?start= querystring

streaming: rate limiting

hotlink protection: control panel settings and encrypted links

formats: FLV and MP4

This method is used if you have pre-segmented, pre-packaged HLS/HDS/DASH/MSS on your origin server. Or you want to use your own transmuxing server as origin.

It is very important that the playlist files contain relative paths (rather than absolute paths) to the video segments, or the video segments will still be served from your origin.

If using your own transmuxing server (such as Wowza), you must use the “VOD HTTP Origin” application type.

cdn-side requirements: none (standard http requests)

origin-side requirements: none (standard http requests)

video preparation: playlist and segments need to be pre-packaged with relative paths

multi-bitrate: all the playlist formats support multi-bitrate auto selection

seeking/scrubbing: playlist

streaming: playlist

hotlink protection: control panel settings, Encrypted Links can be used as long as your origin can create a dynamic playlist containing the encrypted links

formats: HLS HDS DASH MSS

Tansmuxing Mode

CDN will convert a compliant MP4 file into multiple formats on-demand. The video file must have video encoded with H.264 codec and the audio encoded with AAC codec.

With this method you only have to create and store one version of the file in order to publish it in multiple formats.

Only one change is needed in site configuration, select the VOD Types that you want to allow under Extra Configuration -> VOD Transmuxing Types

We use Wowza to serve and convert the fille. Therefore using transmuxing mode is slightly different to origin mode:

  • Take the cdn address of the MP4 file (without protocol) e.g. cdn.yoursite.com/videos/video-1234.mp4
  • Base-64 encode it e.g. Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ=
  • Create a new URL as follows: <protocol>://wowza.cdn.stackcdn.io<port>/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ=<playlist>
  • Values for <protocol>, <port> and <playlist> are listed below
  • You can also use your own subdomain with a cname e.g. wowza.yoursite.com -> CNAME -> wowza.cdn.stackcdn.io
protocol: rtmp

port: 1935 (rtmp default)

playlist: none

example: rtmp://wowza.cdn.stackcdn.io/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ=

protocol: rtsp

port: 554 (rtsp default)

playlist: none

example: rtsp://wowza.cdn.stackcdn.io/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ

+-HLS

protocol: http

port: 8080

playlist: index.m3u8

example: http://wowza.cdn.stackcdn.io:8080/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ/index.m3u8

+-HDS

protocol: http

port: 8080

playlist: manifest.f4m

example: http://wowza.cdn.stackcdn.io:8080/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ/manifest.f4m

protocol: http

port: 8080

playlist: manifest.mpd

example: http://wowza.cdn.stackcdn.io:8080/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ/manifest.mpd

protocol: http

port: 8080

playlist: Manifest

example: http://wowza.cdn.stackcdn.io:8080/vod/Y2RuLnlvdXJzaXRlLmNvbS92aWRlb3MvdmlkZW8tMTIzNC5tcDQ/Manifest

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *