Rella
Rella

Reputation: 66945

VLC + FFMPEG: How to broad cast live streams from web camera readable by html 5 `video` tag?

So via VLC + FFMPEG I can easely broadcast flv live streams via such command:

"C:\VideoLAN\VLC\vlc.exe" -I -rc -vvv dshow:// vdev adev size="640x480" --sout="#transcode{vcodec=FLV1,acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=http{mime=video/x-flv},mux=ffmpeg{flv},dst=:8080/stream.flv}}"

This makes VLC capture video from default windows camera and audio from default microphone, transcode it via ffmpeg to FLV video and stream it onto localhost:8080/stream.flv

You can try it at home by downloading FFmpeg.exe from here and VLC client from here.

FLV can be downloaded or played in real time by any flash video player app you can create.

I wonder is it possible to make it generate video that could be played in real time by HTML 5 <video> tag, What would be VLC + FFMpeg command line argument for that?

Upvotes: 5

Views: 10219

Answers (1)

Paul
Paul

Reputation: 207

Currently the Video tag does not support streaming files and html5 doesn't play ".flv" files What could try is to apply this guide (http://youmakemedia.com/2010/06/convert-flv-video-to-html5-mp4/) on converting from flv to mp4.

You could try to get it to convert chunks from the flv file and then use PHP and Ajax to request the chunks to play in the video tag.

Here is the link to the stackoverflow question about streaming support in the video tag How do you do true streaming with the video tag (i.e. not progressive download)? (html5)

Upvotes: 2

Related Questions