I am trying to play .h264 file in browser, Trying to accomplish this using html video tags. The result is always an empty frame.
I did check some links on web, They recommend to play the video in .mp4 container.
Can someone help me to accomplish this?
UPDATED CODE:
References:
http://www.htmlgoodies.com/html5/client/how-to-embed-video-using-html5.html#fbid=6u-u00TH7Je
The .h264 file contains the raw H.264 stream which is not directly supported in browsers. You can use a tool like FFmpeg
to put it in a container like the other answers recommended:
ffmpeg -f h264 -i test.h264 -c:v copy test.mp4
Edit:
If you must play a raw H.264 byte-stream then you need a browser plugin. Example for VLC web plugin:
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" target="test.h264" />