_____________________________ From: Derek Buitenhuis <derek.buitenh...@gmail.com> Sent: Monday, March 12, 2018 6:54 PM Subject: Re: [FFmpeg-devel] [PATCH] avcodec/openh264enc.c: generate IDR frame in response to I frame pict_type To: <ffmpeg-devel@ffmpeg.org>
On 3/12/2018 6:58 AM, Valery Kot wrote: >> Could somebody please take a look into my patch? Or is it somehow invisible >> / badly formatted? >> >> It allows for inducing key frames at proper moments by e.g. >> -force_key_frames, while using openH264 codec. Thus accurate HLS with LGPL >> license, which is important for us. >Hi, >> + if (frame->pict_type==AV_PICTURE_TYPE_I) { >> + (*s->encoder)->ForceIntraFrame(s->encoder, true); >> + } > Does openh264 differentiate between I and IDR frames in its API, like libx264 > and libx265 do? > - Derek Hey, somebody is seeing my mails. Cool! As far as I see, ForceIntraFrame() is the only API to set type for a particular frame. And (confusingly) description says that it will be an IDR frame. Fair enough: if there is only one possible type they allow, then IDR is the most user-wanted type. API EncodeFrame() returns pBsInf->eFrameType, which can be IDR, I, or P frame flag. So apparently internally openH264 makes a distinction between I frames and IDR. But this is an output parameter, and it’s original value set by user is ignored. Valery _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel