Chapter 4 of 5
Encoding without drama
Everything in the general bitrate chapter still applies: resolution, frame rate and bitrate are one decision, and hardware encoding beats software encoding on a single machine. What changes on Linux is which knob turns on the hardware, and how you confirm it actually happened.
Which encoder is yours
- AMD and Intel: VAAPI. The standard interface to the media engine on both. It is part of the open driver stack, so on a current distribution it is usually present already. In OBS it appears as a VAAPI encoder for H.264 — and, on recent hardware, HEVC and AV1.
- NVIDIA: NVENC. Works well and needs the proprietary driver installed, which your distribution will have a documented way of doing. Do that first, before you open OBS.
- Nobody: x264. The software fallback. It works everywhere, looks slightly better per bit, and costs you the CPU your game wants. Reasonable on a dedicated second machine, rarely right on a single one.
If the encoder you expect is not in the OBS dropdown, that is a driver problem, not an OBS problem, and no amount of reinstalling OBS will fix it.
The one check that matters
Choosing an encoder in a dropdown is not proof it is being used. Do this once:
- Start a local recording of something demanding.
- Watch the GPU's video engine load —
radeontopon AMD,intel_gpu_topon Intel,nvidia-smion NVIDIA — and look specifically at the encoder utilisation, not overall GPU load. - Check your CPU at the same time.
If the video engine is busy, you are done. If it is idle and a CPU core is pinned, something silently fell back to software, and you would otherwise discover it as stutter during a busy scene.
The Flatpak trap
This catches a lot of people: a sandboxed OBS needs the graphics drivers
inside the sandbox. If your VAAPI encoder is missing in a Flatpak OBS but
vainfo on your host lists it happily, you are looking at the sandbox, not the
hardware.
The fix is installing the right runtime extension for your driver — or using the distribution's native OBS package, which uses the system drivers directly. Pick one packaging route and stick with it, as the capture chapter said for plugins.
Settings worth getting right
- Keyframe interval 2 seconds. Required by most platforms, same as everywhere.
- Pick a rate control your platform accepts — CBR is the safe answer for live streaming. VAAPI exposes several modes and the tempting ones are for recording, not broadcast.
- Do not use the same encoder session for stream and recording if you can avoid it. Record with a separate, higher-quality output, which is where your clips come from.
- Check AV1 before enabling it. The hardware may support it and your streaming platform may not accept it for ingest. Recording in AV1 is a different question and can be a good one.
When the GPU is also playing the game
On a single machine your graphics card is rendering the game and encoding the stream, and the encoder is a separate block on the die — but not an infinitely free one.
- Cap your game's frame rate. An uncapped game will consume everything and leave the encoder fighting for scheduling. This does more for stream smoothness than any encoder setting.
- Match your stream frame rate to a divisor of the game's. 60 into 60, or 60 into 30. Odd ratios produce visible judder.
- Watch encode lag, not just dropped frames. They have different causes — the general bitrate chapter has the distinction — and on Linux the statistics window tells you the same things it does everywhere.
If quality is worse than you expected
Work through it in this order:
- Confirm hardware encoding is on using the check above.
- Confirm your actual upload with a real test, at the time you stream.
- Drop the resolution before dropping the frame rate, for fast content. Sharp and small beats large and smeared, on any operating system.
- Only then start adjusting presets and tuning options.
Most "VAAPI looks bad" conclusions turn out to be a starved bitrate or a software fallback, not the encoder.
Next: keeping all of this working through updates, which is the part that decides whether you are still streaming on Linux in a year.