02.04.2020, 21:22, "M Parker" <[email protected]>: >>The option force_key_frames is handled in fftools/ffmpeg.c, so your best > approach is to copy its behaviour. > > I had gotten that far, but setting it still eluded me. After much digging, > some experimentation > and a little luck, I figured out how to code it in: > > AVDictionary *dict; > av_dict_set(&dict, "force_key_frames", expression_string, NULL); > avcodec_open2(videoCodecContext, videoCodec, &dict); > > Hopefully this helps someone in the future. > > ---------------------------------------- > From: Libav-user <[email protected]> on behalf of Carl Eugen > Hoyos <[email protected]> > Sent: Wednesday, April 1, 2020 7:02 PM > To: This list is about using libavcodec, libavformat, libavutil, libavdevice > and libavfilter. <[email protected]> > Subject: Re: [Libav-user] force_key_frames > > Am Mi., 1. Apr. 2020 um 20:23 Uhr schrieb M Parker <[email protected]>: >> >> The command line has an option for forcing key frames, aptly named: >> -force_key_frames >> >> Is it possible to set this via libav, and where would I do it? The closest >> I've been able >> to find is a forced_key_frames option on an OutputStream, and I can't find >> where to access it. > > The option force_key_frames is handled in fftools/ffmpeg.c, so your best > approach is to copy its behaviour. > > Carl Eugen
> AVDictionary *dict; You use av_dict_set to allocate a new dictionary here. It will not allocate unless dict == nullptr so I think you need to initialize dict with nullptr. > Hopefully this helps someone in the future. I hope it will help me, but what is "expression_string"? _______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
