http live streaming intro
DESCRIPTION
a super simple sample of using http live streamingTRANSCRIPT
Using HTTP Live Streaming
twitter:@vonbo29/02/2012
112年2月29日星期三
Intro
Streaming audio or video to iPhone, iPod touch, iPad, or Apple TV
Streaming live events without special server software
Sending video on demand with encryption and authentication
212年2月29日星期三
Intro
312年2月29日星期三
Step By Step
Download segment tools from apple (https://developer.apple.com/downloads/index.action search “HTTP Live Streaming Tools”)
Segment original file into several pieces (.ts file) every 5 ~ 10 seconds
Generate a manifest file (.m3u8 file) which includes all the ts file name
412年2月29日星期三
Sample - Step 1 - Segment$ cd /User/fengbo/project/testhsl/bgrs
$ ls
rwarren.mp4
$ mediafilesegmenter rwarren.mp4
Feb 29 2012 11:22:36.949: Using floating point is not backward compatible to iOS 4.1 or earlier devices
Feb 29 2012 11:22:36.950: Processing file /Users/fengbo/project/testhsl/bgrs/rwarren.mp4
Feb 29 2012 11:22:37.577: Finalized fileSequence0.ts
Feb 29 2012 11:22:37.577: segment bitrate 1.30908e+06 is new max
Feb 29 2012 11:22:37.587: Finalized fileSequence1.ts
Feb 29 2012 11:22:37.600: Finalized fileSequence2.ts
Feb 29 2012 11:22:37.618: Finalized fileSequence3.ts
....
Use the mediafilesegmenter command
512年2月29日星期三
Sample - Step 1 - Segment
$ ls
fileSequence0.ts fileSequence115.ts fileSequence19.ts fileSequence36.ts fileSequence53.ts fileSequence70.ts fileSequence88.ts ... prog_index.m3u8
The manifest file
612年2月29日星期三
Sample - Step 1 - Segment
prog_index.m3u8
712年2月29日星期三
Sample - Step 2 - Deploy
Config Apache
812年2月29日星期三
Sample - Step 2 - Deploy
Write HTML page
cd /User/fengbo/project/testhsl
vim index.html
912年2月29日星期三
Sample - Step 2 - ViewOpen in Safari (Current can not work in Google Chrome)
It works !!!1012年2月29日星期三
End
For more, visit :
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-DontLinkElementID_39
1112年2月29日星期三