Archive for the ‘video’ tag
Encoding to Ogg Theora Format: For use in HTML5
To encode a video file for use in HTML5 video compatible browser (firefox 3.5 and above supports HTML5 video), use the command:
$ ffmpeg -i in.flv -vcodec libtheora -sameq \ -acodec libvorbis -ac 2 -sameq out.ogg
Finally use it in your page:
<video src="out.ogg"> Your browser does not support HTML5 video. </video>
Reference: HTML 5 <video> Tag.
Video format conversion in Linux
To stream video content using Video View Portlet, I had to re-encode some videos to flv format. This is pretty simple in Linux:
$ mencoder -oac copy -ovc lavc -o out.flv in.avi
-oac means Output Audio Codec and -ovc means Output Video Codec. The various options for -oac:
| copy | no encoding, just streamcopy. |
| pcm | Encode to uncompressed PCM. |
| mp3lame | Encode to MP3 (using LAME). |
| lavc | Encode with a libavcodec codec. |
The options for -ovc:
| copy | no encoding, just streamcopy. |
| raw | Encode to an arbitrary uncompressed format (use ’-vf format’ to select). |
| lavc | Encode with a libavcodec codec. |