3

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

More info: http://www.ffmpeg.org/ffmpeg-formats.html#Options-3

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

mczarnek
  • 1,305
  • 2
  • 11
  • 24

1 Answers1

4

This is an AVOption for the mov muxer.

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);
Cornstalks
  • 37,137
  • 18
  • 79
  • 144