[libav-api] write one fragment per file

Arash Shafiei arash.shafiei at gmail.com
Mon Jan 12 17:32:55 CET 2015


hi,

Suppose you make fragmented files using libav apis:

  av_dict_set(&opts, "frag_duration", "1000000", 0);
  av_dict_set(&opts, "movflags", "empty_moov", 0);
  avformat_write_header(fmt_ctx, &opts);

And you write the packets on the file:

  av_interleaved_write_frame(fmt_ctx, &pkt);

Now the question is how do you know when the "av_interleaved_write_frame"
is writing the first frame of the fragment so that you can start dumping
data on a new file. In other word how to write one fragment per file?

Would you know if it is possible using libav apis?

thanks


More information about the libav-api mailing list