HTML and CSS Reference
In-Depth Information
file segmenter ( http://developer.apple.com/library/ios/#documentation/networkinginternet/conceptual/
streamingmediaguide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html ) to take an H.264 file at your
location and segment the output to an M3U8. The M3U8 file is simply a description file instructing the HTML5 video
player on how to play back the video segments along with specific video metadata. In the example, save the segments
and M3U8 file in your desired destination, with a target duration of each chunk at roughly 17 seconds.
Listing 7-4. Media Segmenter Example
mediafilesegmenter Your/File/Location.mov -t 17 -f Your/File/Destination.m3u8
Since the media file is segmented into smaller “chunks,” or segments, the delivery of the video asset comes in
spurts rather than one large progressive download, which improves the overall playback experience. What this means
to you in HTML5 advertising is that instead of locating a source asset, you now target the M3U8 file in your video
source attribute. Based on the previous command, Listing 7-5 demonstrates the output from a manifest file, which is
known as an M3U8 file.
Listing 7-5. M3U8 Example
M3U8 File:
#EXTM3U
#EXT-X-TARGETDURATION:18
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:16.984,
fileSequence0.ts
#EXTINF:17.017,
fileSequence1.ts
#EXTINF:16.95,
fileSequence2.ts
#EXTINF:17.017,
fileSequence3.ts
#EXTINF:16.95,
fileSequence4.ts
#EXTINF:17.017,
fileSequence5.ts
#EXTINF:16.95,
fileSequence6.ts
#EXTINF:17.017,
fileSequence7.ts
#EXTINF:16.984,
fileSequence8.ts
#EXTINF:16.316,
fileSequence9.ts
#EXT-X-ENDLIST
HTML5:
<video src=index.m3u8></video>
As you can see, the M3U8 file describes all of the video transport streams in sequential order and the relative
path to the transport stream (TS) asset. Note that these could be absolute paths to another location, even remotely on
another server altogether. This is important to take notice of because you can do some dynamic insertion of video ads
within the M3U8 manifest.
Search WWH ::




Custom Search