<div dir="ltr"><div>Hi,</div><div><br></div><div>I wrote a simple <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/60608711f0d343f0f3f8110c0a6b304780d40755/3_transcoding.c#L173">video transmuxer/transcoder minimalist</a> to teach people how to use ffmpeg/libav. The goal of this program is to enable its users to do transmuxing (mp4 -> fmp4) and transcoding (h264 -> h264 fixed gop/CBR, h264 -> h265) with the minimum required code.<br></div><div><br></div><div>It's working but I think I'm missing something because I had to use <span class="gmail-pl-s"><b>force-cfr=1</b> for x264 but not for x265, when I remove this force-cfr parameter from x264 the encoded final gets a huge bitrate (27Mbps) and I don't know why, it's frustrating.</span></div><div><span class="gmail-pl-s"><br></span></div><div><span class="gmail-pl-s">The code was inspired by the doc/examples and ffmpeg command line itself I set the TB and duration and also checked the pkt.dts and pkt.pts all seems fine =(<br></span></div><div><span class="gmail-pl-s"><br></span></div><div><span class="gmail-pl-s">Do you have any ideas what I missing? (on x264's case)</span> I detail these issues better in <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial/pull/54">a PR if you want to see</a> it.</div><div><br></div><div><br></div></div>