使用FFMPEG将-movflags + faststart添加到MP4的最快方法,而其他都保持不变 [英] Fastest way to add -movflags +faststart to an MP4 using FFMPEG, leaving everything else as-is

查看:2703
本文介绍了使用FFMPEG将-movflags + faststart添加到MP4的最快方法,而其他都保持不变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将-movflags + faststart添加到mp4文件中.基本上,这就是我要做的,其他任何事情都不应更改.我是ffmpeg.

I want to add -movflags +faststart to an mp4 file. Basically that is all I want to do, nothing else should be changed. I am usinf ffmpeg.

最快的方法是什么?我需要重新编码整个视频吗?还是有更好/更简便的方法?

What's the fastest way to do this? Do I have to re-encode the whole video? Or is there a better/easier way?

推荐答案

很简单:

ffmpeg -i in.mp4 -c copy -map 0 -movflags +faststart out.mp4

或者,如果您可以从源代码编译FFmpeg,请在tools/目录中创建qt-faststart工具并运行它:

Or if you can compile FFmpeg from source, make the tool qt-faststart in the tools/ directory and run it:

qt-faststart in.mp4 out.mp4

您还可以使用mp4box,通过此命令,您可以将MOOV原子移至起始位置:

You can also use mp4box, which lets you move the MOOV atom to the start via this command:

mp4box -inter 0 in.mp4 -out out.mp4

或者如果您想完全

Or if you want to fully optimize for streaming by also interleaving the audio/video data so that the file can be easily streamed in realtime:

mp4box -inter 500 in.mp4 -out out.mp4

这篇关于使用FFMPEG将-movflags + faststart添加到MP4的最快方法,而其他都保持不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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