如何在代码中模拟ffmpeg的empty_moov选项?

时间:2014-02-21 22:02:32

标签: c++ ffmpeg

命令行ffmpeg能够在文件开头使用空的moov_atom。

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

除了代码之外,我想做同样的事情。谁知道怎么做?

1 个答案:

答案 0 :(得分:3)

This is an AVOption for the mov muxer

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

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