fzwoch / obs-gstreamer

GStreamer OBS Studio plugin
GNU General Public License v2.0
349 stars 34 forks source link

gstreamer encoder not respecting bitrate setting #67

Closed ethaniel closed 2 years ago

ethaniel commented 2 years ago

Hello! Once again, thank you for the amazing plugin.

I just tried streaming HEVC via HLS to Youtube by using the "Gstreamer Encoder" option in the encoder settings. The bitrate is set to 6000 kbps, however I can see the actual traffic being 100000 kbps (confirmed by iptraf-ng).

Screen Shot 2021-12-14 at 14 45 18 Screen Shot 2021-12-14 at 14 45 14
fzwoch commented 2 years ago

Did you use a version that includes this change: 219a62963f206ef521eb1b12dddd5b971348128b?

Apart from that, I have never tested the NVENC implementation. It is potentially possible, that that I have mixed up the scale of the bit rate options between OBS and GStreamer's NVENC.

Apart from that, this will be the H.264 encoder. IIRC OBS does not yet expose custom HEVC codec options - or any HEVC options besides using custom FFMPEG which is very relaxed by its design.

So for the use case of NVENC H.264 one should have a very good reason to use the GStreamer encoding over OBS's regular NVENC option.

ethaniel commented 2 years ago

Ahh, so there is no way to make gstreamer encode in h265?

i was under the impression that obs was sending the raw video stream and gstreamer was the one responsible for encoding, even if it meant that i could not use NVENC.

fzwoch commented 2 years ago

GStreamer can do HEVC/H.265 just fine. But inside OBS it has to cooperate with OBS and OBS is not yet prepared for HEVC. So that would need to change first.

ethaniel commented 2 years ago

Thank you!

fzwoch commented 2 years ago

Just out of curiosity. In your test, was the commit applied or not? I just wonder what the state of the NVENC inside GStreamer is. The bitrate settings I use for example are not even found in their documentation.

ethaniel commented 2 years ago

My .so was built on November 3. So I guess not, since your commit is of 8 days ago.