Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 live video "hack"

For the last two month I have been trying to "fool" safari into thinking that it's looking at a file on the server, which in fact is a live video stream from a camera encoded and muxed upon request using Gstreamer into a format that is supported by the browser. Since HTML5 supports progressive video downloads this should at least be possible in theory.

My conclusion is that this gets quite complicated considering that browsers make a partial content request when downloading video files in HTML5, mainly for the sake of seeking. If the server lacks support for this feature the video is not played until the file is completely downloaded.

Have anyone else tried this approach with more success? Or should I just give up and wait for true live video support like RTSP to be integrated into browsers.

Cheers.

like image 394
Lus Avatar asked Oct 06 '10 11:10

Lus


2 Answers

This article provides some useful tips: https://developer.mozilla.org/en/Configuring_servers_for_Ogg_media

Are you serving the X-content-duration header?

like image 130
joeforker Avatar answered Oct 11 '22 12:10

joeforker


You have two possibilies.

With H.264 you can emulate a file with fragmented structure: ISO container (.mp4) with movie fragment atoms (MOOF's).

The other option is Google's WebM. Clients can "join in" the stream any time thanks to MKV file's structure. For best results the first frame transmitted to the client should be akeyframe.

like image 2
vbence Avatar answered Oct 11 '22 11:10

vbence