Http Live Streaming Intro

5,109 views

Published on

a super simple sample of using http live streaming

Http Live Streaming Intro

  1. 1. Using HTTP Live Streaming twitter:@vonbo 29/02/201212年2月29日星期三 1
  2. 2. 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 authentication12年2月29日星期三 2
  3. 3. Intro12年2月29日星期三 3
  4. 4. 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 name12年2月29日星期三 4
  5. 5. Sample - Step 1 - Segment $ cd /User/fengbo/project/testhsl/bgrs $ ls rwarren.mp4 Use the mediafilesegmenter $ mediafilesegmenter rwarren.mp4 command 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 ....12年2月29日星期三 5
  6. 6. Sample - Step 1 - Segment $ ls fileSequence0.ts fileSequence115.ts fileSequence19.ts fileSequence36.ts fileSequence53.ts fileSequence70.ts fileSequence88.ts ... prog_index.m3u8 The manifest file12年2月29日星期三 6
  7. 7. Sample - Step 1 - Segment prog_index.m3u812年2月29日星期三 7
  8. 8. Sample - Step 2 - Deploy Config Apache12年2月29日星期三 8
  9. 9. Sample - Step 2 - Deploy Write HTML page cd /User/fengbo/project/testhsl vim index.html12年2月29日星期三 9
  10. 10. Sample - Step 2 - View Open in Safari (Current can not work in Google Chrome) It works !!!12年2月29日星期三 10
  11. 11. End For more, visit : https://developer.apple.com/library/mac/ #documentation/NetworkingInternet/ Conceptual/StreamingMediaGuide/ Introduction/Introduction.html#/ /apple_ref/ doc/uid/TP40008332-CH1- DontLinkElementID_3912年2月29日星期三 11

×