Page 1 of 1

h.264 codec video bitrate variable mismatch

Posted: Mon Jan 21, 2019 1:48 am
by clking
When using the h.264 encoder and video bitrate set to '%i_v_bitrate%' the resultant bitrate is in mb/s instead of kb/s, which is shown in the interface.

For example, I have a file which is encoded at 1600 kb/s and when using the h.264 encoder with this variable the resultant file is encoded at 1600 mb/s.

A custom ffmepg workflow can be used, but the h.264 codec works well other than this mismatch. I have tested multiple files and types and the result is the same.

Re: h.264 codec video bitrate variable mismatch

Posted: Mon Jan 21, 2019 8:45 am
by admin
Hi clking

This is not a bug but expected behavor; The bitrate input field takes whatever value is in the field. When replacing a value with a variable, the variable holds data which may or may not be a sane value in this context. Now, the %i_v_bitrate% variable returns the bitrate in bits per second. So in your case this would be 1.600.000 (1.6 million) bits per second. This is the actual value you give to the bitrate input field of the encoder. The encoder use this value to create a bitrate of 1.600.000 kb/s, which naturally translates to 1600 mb/s.

In order to accomplish what you want you need to store %i_v_bitrate%/1024 in another variable (using the "Populate variable"-node) and use this new variable in the bitrate input field. Hope this helps.

-steinar