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

时间:2011-11-09 07:47:34

标签: ffmpeg video-streaming video-processing mp4 video-conversion

是否可以从命令行运行ffmpeg,将'moov atom'元数据放在MP4文件的开头,或者在ffmpeg中运行qt-faststart作为后处理操作,这样生成的文件就是流 - 能通过互联网吗?

我当然可以将它作为一个单独的命令运行,但更喜欢它是

  • 作为ffmpeg中的选项,或
  • 作为通过ffmpeg
  • 转换视频文件时的转换后命令行选项的一部分

编辑1

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

  

MOV / MP4 muxer

     

muxer选项包括:

     

' - moov_size bytes'

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.

3 个答案:

答案 0 :(得分:54)

似乎快速启动支持已包含在ffmpeg中。 FFmpeg Formats Documentation

  

<强> -movflags faststart

     

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

答案 1 :(得分:9)

在ffmpeg转换过程结束后,设置并运行qt-faststart。

答案 2 :(得分:1)

ffmpeg具有smooth streaming

的选项
-movflags isml+frag_keyframe

它还可以避免录制过程中断电时损坏视频