如何在代码中模拟ffmpeg的empty_moov选项? [英] How can I simulate ffmpeg's empty_moov option within code?

查看:196
本文介绍了如何在代码中模拟ffmpeg的empty_moov选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命令行ffmpeg可以在文件开头使用空的moov_atom。

Command-line ffmpeg has the ability to use an empty moov_atom at the beginning of a file.

更多信息:
http://www.ffmpeg.org/ffmpeg-formats.html#Options-3

除了代码之外,我想做同样的事情。任何人都知道如何?

I would like to do the same thing, except within code. Anyone know how?

推荐答案

这是mov muxer的 AVOption

avcodec,avformat等中的内容可以在设置时使用 AVOption 。您可以使用 av_opt_set 设置这些选项。它将是这样的:

Things in avcodec, avformat, etc. can take AVOptions when setting them up. You can use av_opt_set to set these options. It would be something like:

// Prefixing it with '+' sets the flag
// Prefixing it with '-' unsets the flag
av_opt_set(formatContext, "movflags", "+empty_moov", 0);

这篇关于如何在代码中模拟ffmpeg的empty_moov选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆