Recording with GStreamer VA-API, bitrate is ignored
Describe your issue
When trying to record screen on OBS using GStreamer VA-API, bitrate is ignored, generating a bigger file than intended, this can be reproduced using the provided command line.
Expected Behavior
I expect to have a file with the desired bitrate
Observed Behavior
I'm getting files with way higher bitrate than wanted
Setup
- Operating System: Arch Linux
- Device: Computer
- GPU: AMD 5700XT
- Mesa Version: 21.2.5
- GStreamer Version: 1.18.5
-
Command line:
gst-launch-1.0 videotestsrc num-buffers=1000 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=60/1, interlace-mode=progressive ! videoconvert ! vaapih264enc bitrate=5000 ! h264parse ! matroskamux ! filesink location=out.mkv
Steps to reproduce the bug
- Open terminal
- Type
gst-launch-1.0 videotestsrc num-buffers=1000 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=60/1, interlace-mode=progressive ! videoconvert ! vaapih264enc bitrate=5000 ! h264parse ! matroskamux ! filesink location=out.mkv
- Use
ffmpeg -i out.mkv
and check the bitrate of the video and see that bitrate is not 5000 kb/s (In my case it's reporting 41188 kb/s)
How reproducible is the bug?
Always
Additional Information
- I've talked with OBS Gstreamer plugin developer and he is facing the same issue.
- If recording using FFMPEG VA-API, the bitrate of the output file is correct.
Edited by José Miguel Sarasola