ffmpeg 中的后处理以移动 MP4 文件中的'moov atom'(qt-faststart)



是否可以从命令行运行ffmpeg,这将把'moov原子'元数据放在MP4文件的开头,或者在ffmpeg中运行qt-faststart作为后处理操作,以便生成的文件可通过互联网流式传输?

我当然可以把它作为一个单独的命令运行,但是我更希望它是

之类的东西。
  • 作为ffmpeg内的选项,或者
  • 作为后期转换的一部分,通过ffmpeg
  • 转换视频文件时的命令行选项

编辑1

http://ffmpeg.org/ffmpeg.html mov

MOV/MP4 muxer

混音器选项:

"-moov_size字节"

Reserves space for the moov atom at the beginning of the file instead of 
placing the moov atom at the end. If the space reserved is insufficient, 
muxing will fail.

似乎ffmpeg中已经包含了快速启动支持。FFmpeg格式文档:

-movflags faststart

运行第二次遍历,将moov原子移动到文件顶部。这操作可能需要一段时间,并且在各种情况下不工作例如碎片输出,因此默认情况下不启用。

最终在ffmpeg转换过程后设置并运行qt-faststart

ffmpeg有一个平滑流的选项

-movflags isml+frag_keyframe

,也有助于避免在录制过程中断电时损坏视频

最新更新