如何用FFMPEG最佳地转换Flash兼容的mp4文件? [英] How to best convert Flash compatible mp4 files with FFMPEG?

查看:233
本文介绍了如何用FFMPEG最佳地转换Flash兼容的mp4文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用ffmpeg将不同的文件转换为Flash兼容的 .mp4 文件,但我似乎无法使其正常工作。当然,目标是以最小的文件大小获得最大的质量。

I am trying to convert different files to a flash compatible .mp4 file with ffmpeg, but I can't seem to get it to work. Of course the objective is to get the greatest quality with the smallest file size.

到目前为止,我有这个,哪个工作,但是它不会在一个flash播放器因为某些原因。结果不是很好,我该如何改善这种转换?

So far I have this, which works, but it doesn't play in a flash player for some reason. The result isn't that great, how can I improve this conversion?

这是我使用的命令:

ffmpeg -i input.file -f mp4 -vcodec mpeg4 -r 25 -b 560000 -s 610x340 -acodec aac -ac 2 -ab 64 -ar 44100 output.file


推荐答案

创建交织元数据(这将允许中间流恢复和倒带/ fforwards),使用gpac实用程序(例如包含在medibuntu中)重新交错文件。转换为mp4如下,FFmpeg版本0.5或更好:

To create the interleaving metadata (which will allow for mid stream resumes, and rewinds/fforwards), use the gpac utilities (included in medibuntu for example) to re-interleave the file. Convert to mp4 as follows, with FFmpeg version 0.5 or better:

ffmpeg -f mp4 -i video.mov -b 400k video.mp4

然后

/usr/bin/MP4Box -inter 500 video.mp4

Tada!完成!这将在JW Flv或其他Flash播放器中正常流动。

Tada! Done! This will stream properly in JW Flv or other flash players.

这篇关于如何用FFMPEG最佳地转换Flash兼容的mp4文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆