2010年9月1日 星期三

本次Apple Special Event所使用的直播技術「HTTP Live Streaming」。

HTTP Live Streaming 技術其實在WWDC 2009的時候就已經被提及,根據Apple網站上的這份文件

 

It is basically a playlist (M3U) with “hint as extended comment” that indicate where to jump to when someone try to seek.

它基本上是一個播放清單(M3U)加上當播放器在在尋找播放檔案時,指示要跳到哪個檔案的「延伸註記」。

 

Your encoder must produce small files MPEG 2 TS or PS or audio elementary stream.

編碼器必須生成MPEG 2 TS、MPEG2 PS或音訊ES的小型檔案。

 

By small file they talk about 10s per file as a typical value.

「小型檔案」一般指的是大約10秒長度的檔案。

 

Then you must produce those playlist file (easy for VOD) but for live they have the option of a sliding window playlist (let’s say a playlist that is dynamicaly updated with the next chunk as they appear.)

然後,必須生成那些小檔案的播放清單。但是在直播的狀況下,可以選擇使用滑動視窗型的播放清單(可以解釋成,當下一個檔案片段出現時,播放列表會跟著動態更新)。

 

So all in all it might be possible to do a continuous streaming of a live event in Near Real Time.

所以,這有可能做到以近似即時的方式來串流現場活動。

 

This draft recommend to have always 3 chunk available at any given time and to start playing.

此草案建議在任何時間點開始播放時,永遠都要有三個片段可供播放,除了整個檔案的最後一個片段以及倒數第二個片段。

 

所以基本上,它是一個以文字檔構成的播放清單(以Apple軟體開發網站的範例來說,是副檔名為.m3u8的文字檔)。Safari(更正確來講因該是QuickTime X)會照著這個播放清單來連續播放一堆很短的影片檔。在此同時QT也會持續重新讀取播放清單,來確定接下來要播放的檔案位置。

這種方法與從前的QuickTime即時串流不同,在客戶端完全是以HTTP的形式來讀取檔案,因此免去了防火牆的問題。「理論上」最短延遲時間大概就是每個小檔案的長度。

雖然這看起來似乎是簡單又有效率的方法,不過當頻寬不夠的時候,該lag的時候還是會lag....

 

via Re/ WWDM 2009 and macwebcaster.com » Blog Archive » What is HTTP Live Streaming?

沒有留言:

張貼留言