vpxenc (vp8 and vp9) don't seem to respect calculated bitrate
Describe your issue
vp8enc and vp9enc use the correct bitrate when target-bitrate
is set to a fixed number but do not calculate the same when target-bitrate = 0
and bits-per-pixel = 0.1
.
Expected Behavior
The bitrate of the encoder to be calculated based on the bits-per-pixel
value.
Observed Behavior
The bitrate falls back to the default 256000 value when target-bitrate = 0
and bits-per-pixel = 0.1
.
Setup
- Operating System: Fedora 37
- Device: Computer
- GStreamer Version: 1.20.5
- Command line: (I am using it in a C project)
Steps to reproduce the bug
- Create a sample pipeline using vp8enc or vp9enc in C
- Set the properties
target-bitrate = 0
andbits-per-pixel = 0.1
- Compile and launch the program with the
GST_DEBUG_DUMP_DOT_DIR
environment variable set (/tmp for example) - Use the following line to dump a dot file
GST_DEBUG_BIN_TO_DOT_FILE (bin, GST_DEBUG_GRAPH_SHOW_ALL, "bin-file");
- Generate an image from the dumped file
dot -Tpng -oimage.png bin-file.dot
This image file shows the properties set for the encoder.
How reproducible is the bug?
Always
Screenshots if relevant
Solutions you have tried
Knew it wouldn't work, but still tried setting target-bitrate
to 1, the result was it was set to 0. The video output was non-existent after this as expected.