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:
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:
发布评论
评论(1)
我最终使用了 ffmpeg 和 ffmpeg2theora。
WebKit 兼容的 h.264 视频
我决定使用 ipod640 预设,因为这意味着可以在 iPhone 或 iPod touch 上很好地观看视频。当然,您可以稍微更改一下设置,去掉“-vpre ipod640”,更改分辨率或质量。无论如何,命令是:
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
将一些信息移动到文件前面,以便视频可以在加载之前播放
qt-faststart video_out_file.mp4 video_out_file_quickstart.mp4
Firefox 兼容 Ogg 视频
这取决于您是否安装了 ffmpeg2theora。另外,我只用输入文件作为之前 ffmpeg 转换的输出文件进行了测试。命令为:
ffmpeg2theora -o video_out_file.ogv video_out_file.mp4
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