The HTTP MP4 Pseudo Streaming and HTTP FLV Pseudo Streaming options of CDN Static and CDN Static Push services allows you to enable HTTP pseudo streaming (also referred as progressive download). With pseudo streaming enabled you can use CDN Static and CDN Static Push services to effectively stream your MP4 or FLV video files.
Pseudo streaming works over HTTP protocol and it supports seeking to not yet downloaded parts of a video file. It works with Flash and HTML5 players such as JW Player or Flowplayer and it also works natively on iOS and Android devices. Please refer to Differences between true streaming and pseudo streaming for more details.
How to enable
To enable HTTP MP4 and FLV pseudo streaming of CDN Static or CDN Static Push service please visit the Services/Settings page and select "Enabled" from the corresponding select boxes. Pseudo streaming can also be enabled in advanced settings during a CDN service creation.
Once enabled pseudo streaming works out of the box. Let's assume that you have created a CDN Static or CDN Static Push service, you have enabled pseudo streaming and that you have a video file on your origin with the corresponding CDN URL http://12345.r.cdnsun.net/videos/video.mp4. To integrate the CDN URL with the JW Player please refer to the following embed code. Please notice the startparam configuration option below, it defines the query string offset parameter described in the next section.
The above embed code will allow you to seek to not yet downloaded parts of the video file. Please refer to HLS streaming through a CDN Static service for examples with on-demand and live HLS streams.
Query string offset parameter
When a video file is initially loaded, the player reads and stores a list of seek-points. These seek-points are offsets in the video file at which new key frames start. When a user seeks to a not yet downloaded part of the video file, the player maps this seek to the nearest seek-point. Next, the player does a request to the server, adding the seek-point as a query string parameter.
MP4 Pseudo Streaming
The query string offset parameter is denoted start and it accepts numeric (not necessarily integer) values in seconds.
Skip the first second.
Skip the first and a half second.
FLV Pseudo Streaming
The query string offset parameter is denoted start and it accepts integer values in bytes.
Skip the first byte.
Skip the first kilobyte.
How to verify that pseudo streaming is working
If pseudo streaming is enabled for your CDN service and if it is well integrated in your player (query string offset parameter is defined) then the player allows you to seek to not yet downloaded parts of your video file. For JW Player you can test it here.
The moov atom also referred as movie atom defines timescale, duration and other characteristics of the video. Please note that your videos must contain the moov atom at the beginning of the file. To view the atom tree you can use the AtomicParsley tool with --test switch.
Example - moov atom at the beginning
Atom moov @ 24 of size: 181613, ends @ 181637
Example - moov atom at the end
Atom moov @ 202493816 of size: 3171066, ends @ 205664882
Test pseudo streaming in JW Player or read about differences between true streaming and pseudo streaming and HLS streaming through a CDN Static service.