GNOME Bugzilla – Bug 722087
encoder: h264: target bitrate for CBR is not respected
Last modified: 2014-01-22 18:12:22 UTC
When encoding with constant bitrate (CBR), the requested target bitrate is not respected. For instance, for a 320x240 stream, we would expect by default around 64 bits per macroblock (576 kbps). So, this is the maximum target bitrate, that is also emitted in the final container. However, in practice, the bitrate obtained is much larger (around 1.6 Mbps). I am not certain this is a gstreamer-vaapi bug, but at least we can track the impact to this middleware here.
Multiple issues involved. On the gstreamer-vaapi side: VAEncSequenceParameterBufferH264.ip_period is incorrectly set, thus breaking the VA driver heuristics for per slice-type stats. The CPB buffer size is also too long (8 sec). Patches too follow, but also depends on VA driver patches.
The gstreamer-vaapi side of things can be fixed by 0.5.8 timeframe. VA driver will require another iteration.
commit 9d5fc53899fc05eecc4d7202946e0098427ba8a5 Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Tue Jan 21 19:04:41 2014 +0100 encoder: h264: fix default CPB buffer size. Fix default CPB buffer size to something more reasonable (1500 ms) and that still fits the level limits. This is a non configurable property for now. The initial CPB removal delay is also fixed to 750 ms. https://bugzilla.gnome.org/show_bug.cgi?id=722087