在 ffmpeg 中进行后处理以移动“moovatom”在 MP4 文件中(qt-faststart)
是否可以从命令行运行 ffmpeg ,它将“moovatom”元数据放在 MP4 文件的开头,或者运行 qt-faststart 作为 ffmpeg 中的后处理操作,以便生成的文件可以通过流式传输互联网?
我当然可以将它作为单独的命令运行,但更希望它作为
- ffmpeg 中的一个选项,或者
- 作为通过 ffmpeg 转换视频文件时的转换后命令行选项的一部分
Edit 1
http://ffmpeg.org/ffmpeg.html#mov
MOV / MP4 混合器
复用器选项是:
'-moov_size 字节'
为文件开头的 moov 原子保留空间,而不是 将 moov 原子放在末尾。如果预留空间不足, 混合将会失败。
Is it possible to run ffmpeg from the command line which will either place the 'moov atom' metadata in the beginning of the MP4 file or run the qt-faststart as a post processing operation in ffmpeg so the generated file is stream-able through the internet?
I can of course run it as a separate command, but would prefer it to be something
- as an option within ffmpeg, or
- as part of a post conversion, command line option when converting the video files via ffmpeg
Edit 1
http://ffmpeg.org/ffmpeg.html#mov
MOV / MP4 muxer
The muxer options are:
‘-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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来 ffmpeg 中已经包含了 faststart 支持。 FFmpeg 格式文档:
Seems like faststart support has been included in ffmpeg. FFmpeg Formats Documentation:
在 ffmpeg 转换过程之后结束了设置并运行 qt-faststart。
Ended up setting up and running qt-faststart after ffmpeg conversion process.
ffmpeg 有一个平滑流选项
,它对于避免断电时视频损坏也很有用录音期间
ffmpeg has an option for smooth streaming
and it's also useful for avoiding corrupt videos when power loss during recording