ffmpeg settings for converting to mp4 and ogg for HTML5 video [closed]

谁说我不能喝 提交于 2019-12-02 13:57:39
betamax

I ended up using ffmpeg and ffmpeg2theora.

WebKit compatible h.264 video

I decided to go for the ipod640 preset because it means the video can be viewed nicely on an iPhone or iPod touch. Of course, you can change the settings around a bit, get rid of the '-vpre ipod640', change the resolution or quality. Anyway the command is:

ffmpeg -i video_source_file.ext -vcodec libx264 -vpre ipod640 -b 250k -bt 50k -acodec libfaac -ab 56k -ac 2 -s 480x320 video_out_file.mp4

move some information to the front of the file so the video can play before it loads

qt-faststart video_out_file.mp4 video_out_file_quickstart.mp4

Firefox compatible Ogg video

This depends on you having ffmpeg2theora installed. Also, I have only tested it with the input file being the output file from the previous ffmpeg conversion. The command is:

ffmpeg2theora -o video_out_file.ogv video_out_file.mp4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!