Overview
Media Delivery allows you to define how the CDN treats a variety of different media types including Flash media.
Flash Pseudo Streaming
Flash Pseudo Streaming allows you to define how the CDN delivers Flash media.
Initial Bytes Parameter
This is the name of the query string parameter used to specify the initial bytes of a video that should be returned before sending the requested byte offset. Typically players use ib
for this query string parameter.
Frame Start Offset Parameter
This is the name of the query string parameter used to specify the specific byte offset into the requested video. Typically players use fs
for this query string parameter.
Reserved Query String Parameters
Reserved Query String Parameters allows you to define special query string parameters the CDN will use to alter responses.
Content-Disposition File Name Query String Parameter
This is the query string parameter name which will specify the filename used in the Content-Disposition header when it's enabled.
Content-Disposition Type
This is the query string parameter name which will specify the type (inline or attachment) used in the Content-Disposition header when it's enabled.
Content-Disposition Header Override
This is the query string parameter name which will override the whole value in the Content-Disposition header.
Pseudo Streaming
Pseudo Streaming allows you to enable Flash-based video players to support seeking to random locations within an MP4 or FLV file without having to download the entire video.
Flash players such as Flowplayer and JWPlayer can be configured to send a query string parameter that indicates to the server the time offset the user advanced the video to. Typically a query string parameter named start
is used by these players.
Note that the CDN supports range requests to the HTTP specification here.
Jump-to-Time
For H.264-encoded videos, the Highwinds CDN natively supports a jump-to-time
feature on the CDS platform, allowing you to seek to a portion of the video that may not yet be downloaded. Simply add a URL parameter named "start" and a timestamp (in seconds), and the CDN will deliver the stream from that point forward. The start
parameter is used by default for Jump-to-Time functionality, however that parameter name is configurable on the CDN. In many instances, FLVs with enhanced metadata also support this Jump-to-Time functionality.
When using the jump-to-time for videos such as .MP4, there is often a moov
atom that contains necessary metadata about the video. For fast seeking to portions of the video that have not yet been downloaded, this "moov" atom will need to be present at the beginning of the video rather than the end. Tools are available to reposition the moov
atom within an existing video.
Jump-to-Byte
Some types of videos (such as metadata-enhanced FLVs) can be enabled with progressive seek functionality via the "jump-to-byte" approach. When using Jump-to-Byte, there are two query string parameters than can be utilized. The ib
query string parameter is used to specify the initial bytes of a video that should be returned before sending the requested byte offset. The "fs" query string parameter is used to specify the specific byte offset into the requested video. The parameter names ib
and fs" are used by default on the CDN, however these names are configurable.
In order for this jump-to-byte process to work, your FLVs must have metadata within them (specifically the “keyframes” element). If they don’t today, download FLVMDI of FFMPEG and run it against each of your files with the /k switch (this will inject the keyframe metadata): http://www.buraks.com/flvmdi
If you already have the metadata needed for each video, then you should have an xml file that has a list of file positions and time codes for all of the keyframes in the video. You basically need to have is a mapping between times and the keyframes that are the closest to those times. This is accomplished by mapping the time indexes in the times
array to the keyframe indexes in the filepositions
array. Both of these arrays are found on the keyframes
metadata element.
Note that there are a few ways to accomplish this:
1) You can do it all in the player:
- Initially load the file from the beginning, which will cause the
onMetaData
handler to fire as soon as the metadata is read from the file's header. - Within the
onMetaData
handler, load the time indexes and keyframe file positions into a lookup table. - When a scrubbing event occurs, use the lookup table to find the file position of the keyframe that most closely matches the time index that you passed in.
- Re-request the file with the
ib=13&fs=<keyframe>
parameters.
Leave theib=13
on for all requests (both theib
andfs
parameters are optional for the initial request).
2) You can do it all on the server:
- Run FLVMDI with both the /k and the /x switch, which will output an XML file containing all of the keyframe data.
- Import the keyframe file positions and the times (there should be the same number of elements in each array) into your database.
- When a scrubbing event occurs for non-downloaded portions of the file, make a call back to the server for the new
fs
parameter values. - Write a simple server-side web service call that finds the closest keyframe to the time index that you are looking for, and returns it when called.
- Re-request the file with the
ib=13&fs=<keyframe>
parameters.
3) Or you can perform a hybrid of the two:
- Run FLVMDI with both the /k and the /x switch, which will output an XML file containing all of the keyframe data.
- Import the keyframe file positions and the times (there should be the same number of elements in each array) into your database.
- When generating the player page for the selected video, include data in the page itself that will allow the player to do the lookup without needing to build the index using information from the onMetaData event.
- When a scrubbing event occurs, use the lookup table to find the file position of the keyframe that most closely matches the time index that you passed in.
- Re-request the file with the
ib=13&fs=<keyframe>
parameters.
Field | Default Parameter | Description |
---|---|---|
Jump-to-Byte Initial Bytes Parameter | ib | This is the name of the query string parameter that indicates to the CDN the initial bytes of a video that should be returned before sending the requested byte offset. This parameter is part of the jump-to-byte feature that is initiated on a per request basis. |
Jump-to-Byte Offset Parameter | fs | This is the name of the query string parameter that indicates to the CDN the specific offset into the video that is being requested. This parameter is part of the jump-to-byte feature that is initiated on a per request basis. |
Jump-to-Time End Parameter | end | This is the name of the query string parameter that indicates to the CDN the end time offset of the video that should be returned. This parameter is part of the jump-to-time feature that is initiated on a per request basis. |
Jump-to-Time Start Parameter | start | This is the name of the query string parameter that indicates to the CDN the start time offset of the video returned. This parameter is part of the jump-to-time feature that is initiated on a per request basis. |
Bandwidth Throttling Initial Burst Parameter | ri | This is the name of the query string parameter that indicates to the CDN an initial burst rate to use when delivering a file. This parameter is part of the bandwidth limiting feature that is initiated on a per request basis. Specifies a value in bytes that should run at full speed before an "rs" parameter takes effect. |
Bandwidth Throttling Sustained Rate Parameter | rs | This is the name of the query string parameter that indicates to the CDN the sustained rate being requested for the delivery of a file. This parameter is part of the bandwidth throttling feature that is initiated on a per request basis. Specifies a value in kilobits per second at which the transfer should run at that rate sustained. This can be used with progressive download delivery to keep the player from getting too far ahead of what the end user is actually viewing. |