[Libav-user] How to set moov_size?

Erik Oomen oomen.e at gmail.com
Mon Dec 12 11:08:03 CET 2011


I'm trying to set the moov_size when recording to a .mov file, however I can't figure out how to do this properly.

For example this doesn't work:
 output_format = av_guess_format("mov", NULL, NULL); 
 output_context = avformat_alloc_context();
 output_context->oformat = output_format;
 codec = avcodec_find_encoder(CODEC_ID_H264);
 video_st = add_video_stream(output_context, codec, p->parent->parent);

 /* This does not work */
 av_opt_set_int(&output_format->priv_class, "moov_size",120000, AV_OPT_FLAG_ENCODING_PARAM);

At the moment I'll post process the movies with qt-faststart, but it would be nice if I can skip this step.


More information about the Libav-user mailing list