We accelerate websites

15 days free trial Sign up

Media Acceleration Stream to the world

15 days free trial Sign up

Extensive Network Excellent world coverage

Setting an HTTP pseudo streaming

Introduction

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.

Usage Example

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.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="http://p.jwpcdn.com/6/10/jwplayer.js"></script>

<div id="mediaplayer"></div>

<script type="text/javascript">
    $(document).ready(function(){        
        jwplayer('mediaplayer').setup({                           
            'file': 'http://12345.r.cdnsun.net/videos/video.mp4', 
            'startparam': 'start'
        });
    });
</script>

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.

Example 1

Skip the first second.

http://12345.r.cdnsun.net/myvideo.mp4?start=1

Example 2

Skip the first and a half second.

http://12345.r.cdnsun.net/myvideo.mp4?start=1.5

FLV Pseudo Streaming

The query string offset parameter is denoted start and it accepts integer values in bytes.

Example 1

Skip the first byte.

http://12345.r.cdnsun.net/myvideo.flv?start=1

Example 2

Skip the first kilobyte.

http://12345.r.cdnsun.net/myvideo.flv?start=1024

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.

Moov atom

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    

What next?

Test pseudo streaming in JW Player or read about differences between true streaming and pseudo streaming and HLS streaming through a CDN Static service.

 
__    __   __   __   _    _      ___    
\ \\ / //  \ \\/ // | |  | ||   / _ \\  
 \ \/ //    \ ` //  | |/\| ||  | / \ || 
  \  //      | ||   |  /\  ||  | \_/ || 
   \//       |_||   |_// \_||   \___//  
    `        `-`'   `-`   `-`   `---`   
                                        
Europe
  • Amsterdam
  • Athens
  • Bucharest
  • Budapest
  • Chelyabinsk
  • Copenhagen
  • Dubai
  • Dublin
  • Frankfurt
  • Helsingborg
  • Helsinki
  • Istanbul
  • Khabarovsk
  • Kharkov
  • Kiev
  • Kungalv
  • London
  • Lvov
  • Madrid
  • Milan
  • Moscow
  • Oslo
  • Paris
  • Polevskoy
  • Saint Petersburg
  • Stockholm
  • Tel Aviv-Yafo
  • Zagreb
America
  • Arlington
  • Atlanta
  • Chicago
  • Dallas
  • Denver
  • Green Bay
  • Los Angeles
  • Miami
  • Montreal
  • New York
  • Phoenix
  • Portland
  • Provo
  • Queretaro
  • Reston
  • Sacramento
  • San Jose
  • Sao Paulo
  • Seattle
  • Toronto
  • Washington
Contact
  • e-mail: info@cdnsun.com
  • skype: cdnsun.com
  • phone: +1 844 300 9206
  • phone: +420 776 256 872
Blog Twitter LinkedIn Facebook CrunchBase Google+ / Google plus Foursquare Pinterest