Convert to OOG
ffmpeg -i sourcevideo.mov -acodec libvorbis -vcodec libtheora -ac 2 -ab 96k -ar 44100 -b 819200 -s 1080×720 Outputvideo.ogv
-acodec libvorbis for encoding with Vorbis audio codec
-vcodec libtheora for encoding with theora video codec
-ac 2 for stereo audio channel
-ab 96k for constant audio bit rate
-ar 441000 audio sampling rate
-b 819200 specifies the video bitrate ( 800 kbps , 800 x 1024 = 819200)
-s 1280x720 specifies the size in terms of width by height
Convert to WebM
ffmpeg -i sourcevideo.mp4 -vcodec libvpx -acodec libvorbis -aq 5 -ac 2 -qmax 25 -b 614400 -s 1280×720 Outputvideo.webm
-vcodec libvpx for encoding with VP8 video codec
-acodec libvorbis for encoding with Vorbis audio codec
-aq 5 audio quality(0-10) with a higher number for better quality channel
-qmax 25 is maximum quantizer with lower value for better quality
-b 614400 specifies the video bitrate ( 600 kbps video,600 x 1024 = 614400)
-s 1280x720 specifies the size in terms of width by height
source:
http://www.mediaentertainmentinfo.com/2014/08/2-technical-series-how-to-convert-video-for-html5-using-ffmpeg.html/
Tip
-an no audio
Tip
avanti gui frontend for ffmpeg
Tip
Videos can also be converted by VLC
Links:
http://slhck.info/video-encoding.html
https://trac.ffmpeg.org/wiki/Encode/VP8