Fastest way to add -movflags +faststart to an MP4 using FFMPEG, leaving everything else as-is

╄→尐↘猪︶ㄣ 提交于 2020-03-14 18:22:27

问题


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?


回答1:


As simple as:

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

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

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


来源:https://stackoverflow.com/questions/50914503/fastest-way-to-add-movflags-faststart-to-an-mp4-using-ffmpeg-leaving-everythi

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