Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to play H.264 video in browser?

I have transcoded each frame of my video from RGB -> YUV12 -> H264. On the exit I have H.264 video stream and I want to watch it without VLC media player and etc.

Stream should be available from different devices such as PC, tablet, smartphone in this way

I will use only browser.

Which method to choose?

Maybe Flash helps? Transcode video from h.264 to mp4? Anything else?

Thank you for any idea.

like image 385
DaShar Avatar asked Nov 11 '22 03:11

DaShar


1 Answers

The <video> tag supports RTSP streams.
On Firefox, Chrome and IE9+, you can use:

<video src="rtp://domain.com/stream">
    Your browser does not support RTP streams.
</video>

or

<video src="rtsp://domain.com/stream">
    Your browser does not support RTP streams.
</video>

In good old IE8, VLC comes with an ActiveX plugin (VLC web-plugin) that allows video streaming:

<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
     codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
     width="640" height="480" id="vlc" events="True">
   <param name="Src" value="rtsp://cameraipaddress" />
   <param name="ShowDisplay" value="True" />
   <param name="AutoLoop" value="False" />
   <param name="AutoPlay" value="True" />
   <embed id="vlcEmb"  type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="480"
     target="rtsp://cameraipaddress" ></embed>
</OBJECT>
like image 119
Stefan Steiger Avatar answered Nov 15 '22 11:11

Stefan Steiger