在 ffmpeg 中进行后处理以移动“moovatom”在 MP4 文件中(qt-faststart)

发布于 2024-12-14 13:29:19 字数 519 浏览 5 评论 0原文

是否可以从命令行运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

浅紫色的梦幻 2024-12-21 13:29:19

看起来 ffmpeg 中已经包含了 faststart 支持。 FFmpeg 格式文档

-movflags faststart

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

Seems like faststart support has been included in ffmpeg. FFmpeg Formats Documentation:

-movflags faststart

Run a second pass moving the moov atom on top of the file. This
operation can take a while, and will not work in various situations
such as fragmented output, thus it is not enabled by default.

眉目亦如画i 2024-12-21 13:29:19

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

Ended up setting up and running qt-faststart after ffmpeg conversion process.

辞取 2024-12-21 13:29:19

ffmpeg 有一个平滑流选项

-movflags isml+frag_keyframe

,它对于避免断电时视频损坏也很有用录音期间

ffmpeg has an option for smooth streaming

-movflags isml+frag_keyframe

and it's also useful for avoiding corrupt videos when power loss during recording

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文