ffmpeg 转换命令输出到 iPad 的 h.264

发布于 2024-09-28 05:56:13 字数 1163 浏览 0 评论 0原文

我正在寻找一个好的(通用)转换命令,可以将任何输入文件转换为适合 iPad 的 h.264 大小。

目前我有这个有效的命令,该命令改编自 robert. swain

有预设:

$ ffmpeg -i INPUT -acodec aac -ab 160000 -s 1024x768 -vcodec libx264 \
         -vpre slow -vpre ipod640 -b 1200kb -threads 0 -f mp4 OUTPUT.mp4

长格式,无预设:

$ ffmpeg -i INPUT -acodec aac -ab 160000 -s 1024x768 -vcodec libx264 \
         -coder 1 -flags +loop -cmp +chroma \
         -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh \
         -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 \
         -i_qfactor 0.71 -b_strategy 2 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 \
         -bf 3 -refs 5 -directpred 3 -trellis 1 \
         -flags2 +bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp 2 \
         -rc_lookahead 50 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 \
         -level 30 -maxrate 10000000 -bufsize 10000000 -wpredp 0 -b 1200k \
         -threads 0 -f mp4 OUTPUT.mp4

注意:我跳过宽高比,因为我们在程序中处理它,并且只有在输入分辨率大于输出分辨率时才调整它的大小。

如果有任何改进建议,我们会寻求平衡速度、质量和转换时间。

I'm looking for a good (general) conversion command that will convert any input file to h.264 sized for the iPad.

Currently I have this command that works, that was adapted from robert.swain

With presets:

$ ffmpeg -i INPUT -acodec aac -ab 160000 -s 1024x768 -vcodec libx264 \
         -vpre slow -vpre ipod640 -b 1200kb -threads 0 -f mp4 OUTPUT.mp4

Long form, no presets:

$ ffmpeg -i INPUT -acodec aac -ab 160000 -s 1024x768 -vcodec libx264 \
         -coder 1 -flags +loop -cmp +chroma \
         -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh \
         -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 \
         -i_qfactor 0.71 -b_strategy 2 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 \
         -bf 3 -refs 5 -directpred 3 -trellis 1 \
         -flags2 +bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp 2 \
         -rc_lookahead 50 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 \
         -level 30 -maxrate 10000000 -bufsize 10000000 -wpredp 0 -b 1200k \
         -threads 0 -f mp4 OUTPUT.mp4

Note: I'm skipping the aspect ratio because we handle that in the program, and we only resize it if the input resolution is greater than the output resolution.

If there's any suggestions for improvement, we are looking to balance speed, quality and conversion time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆伤 2024-10-05 05:56:13

检查此链接。您可以摇动手机进行所有转换设置。
http://develop.participatoryculture.org/index.php/ConversionMatrix

Check this link. All the conversion settings you can shake a phone at.
http://develop.participatoryculture.org/index.php/ConversionMatrix

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文