AnsweredAssumed Answered

i.MX6 h264 encoder bitrate higher than asked in CBR mode

Question asked by Jean-François Pascolo on Jan 17, 2019
Latest reply on Jan 30, 2019 by Jean-François Pascolo

Hi everybody,

 

I'm working for a video streaming application, and have to work in constant bitrate mode (5500 kbits/s).

Générally, it works well and the mesured bitrate is CBR +/- 200 kbits/s. Some times a little peak, but just on some images.

 

But we have some rare videos where the bitrate is about 6500 kbits/s, during one to two minutes !

As the video is not just streamed but also saved onto disk, I could extract frames and compute a real mesure.

 

For exemple, here is what we have the first 3 seconds. The GOP is 5, and mesures are computed every 5 images, so 200ms into the array

time (s)nb bits for 5 images (IPPPP)average bitrate (bits/s)
07889080
0,23089000
0,450393205723264
0,661634405460216
0,864354806162560
165738406460736
1,266007206543912
1,465302006564496
1,665793206569016
1,865384006555088
265964406564144
2,265310806569088
2,465754806584696
2,666040406590192
2,866164406591808
366239206592496

 

As we can see, the bitrate is 6500 kbits/s, instead of the programme 5500 kbits/s.

 

After 100 s, bitrate suddenly falls to 5500 kbits/s as set into the encoder open parameters, without resetting or doing something particular...

The scene, before or after this change, can be considered as static (some really few movement), and is allways the same.

 

My system version is resumed here :

- Linux kernel 3.14.38

- libfslvpuwrap3    version  1.0.61-r0

- firmware-imx-vpu-imx6q      version 1:5.2-r0

- libgstfsl-1.0-0    version   4.0.7-r0

- gst1.0-fsl-plugin     version 4.0.7-r0

And unfortunately I can not change it...

The gstreamer plugin uses the wrapper VPU_EncOpenSimp() function to open the encoder (which set to "0" initialDelay and VbvBufferSize, and others parameters).

 

Is there a known issue about such a problem ?
Is there something I can do to add some usefull informations ?

 

Thanks for any help you could offer.

Regards,

Jean-François

Outcomes