CasparCG vs. FFMPEG - libx264 PCR Interval differences!

@mint This isn’t true. The version I’m using (please check the link in the first post) uses latest ffmpeg 4.0 - 32bit shared libraries.

However, I have found the issue with that CasparCG version. It seems like gop size or keyint are somehow fixed at very low values (0 or 1). Same result happens if I enter “-x264opts keyint=1” or “g=1” to direct ffmpeg command. I tried to parse the parameters to CasparCG (keyint=25, g=25), but it seems the keyint parameter is ignored for some reason.
I also checked the source code at: https://github.com/jaskie/Server/blob/master/modules/ffmpeg/consumer/ffmpeg_consumer.cpp

I’m not 100% sure, but is it possible the line 387 (c->max_b_frames = 0;) is the issue? It sets fixed b-frames value to zero, so only I-frames are used and that is actually the same as setting “keyint=1” (only use I-frames)? Maybe some other parameter is the issue. I’m not a good programmer, but however, I’ll post the ffmpeg command that produces the same wrong PCR stream, so if someone can check that ffmpeg command and compare it against the ffmpeg-consumer cpp code, I’d be really thankful.

ffmpeg -re -i 1.mp4 -c:v libx264 -x264opts nal-hrd=cbr:keyint=1 -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 645k -muxrate 6450k -pcr_period 30 -c:a aac -b:a 192k -ac 2 -ar 48000 -f mpegts “udp://239.1.1.1:10000?pkt_size=1316”

The code above produces the exact same veriable PCR-interval as does CasparCG v2.6 I’m using above. The same happens if I set “-g 1” to ffmpeg command.

Thanks in advance, regards.