不错的文章,转载一下,
http://paulrouget.com/e/converttohtml5video/
Here are my 3 command lines to convert to WebM, OGG/Theora and mp4:
- OGG/Theora
ffmpeg -i input.mov \ -acodec libvorbis -ac 2 -ab 96k -ar 44100 \ -b 345k -s 640x360 output.ogv
- WebM/vp8
ffmpeg -i input.mov \ -acodec libvorbis -ac 2 -ab 96k -ar 44100 \ -b 345k -s 640x360 output.webm
- MP4/h264
ffmpeg -i input.mov \ -acodec libfaac -ab 96k \ -vcodec libx264 -vpre slower -vpre main \ -level 21 -refs 2 -b 345k -bt 345k \ -threads 0 -s 640x360 output.mp4