OBS Studio Setup and Encoding Settings¶
OBS Studio is the standard for streaming and recording — open source, cross-platform, and capable of everything you'd need for a production setup. The defaults are fine to get started but getting encoding settings right matters for stream quality and CPU/GPU load.
Installation¶
Linux:
# Fedora
sudo dnf install obs-studio
# Ubuntu/Debian (flatpak recommended for latest version)
flatpak install flathub com.obsproject.Studio
# Ubuntu PPA (if you want apt)
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update && sudo apt install obs-studio
Windows/macOS: Download from obsproject.com.
Encoding Settings¶
The most important settings are in Settings → Output → Streaming.
If you have an NVIDIA GPU (recommended):
| Setting | Value |
|---|---|
| Encoder | NVENC H.264 (or AV1 if streaming to YouTube) |
| Rate Control | CBR |
| Bitrate | 6000 Kbps (Twitch max), up to 20000+ for YouTube |
| Keyframe Interval | 2 |
| Preset | Quality |
| Profile | high |
| Look-ahead | Enable |
| Psycho Visual Tuning | Enable |
| GPU | 0 |
| Max B-frames | 2 |
If using CPU (x264):
| Setting | Value |
|---|---|
| Encoder | x264 |
| Rate Control | CBR |
| Bitrate | 6000 Kbps |
| Keyframe Interval | 2 |
| CPU Usage Preset | veryfast or superfast |
| Profile | high |
| Tune | zerolatency |
NVENC offloads encoding to the GPU, leaving CPU free for the game/application. Use it whenever available. x264 on veryfast is a reasonable CPU fallback if your GPU doesn't support hardware encoding.
Output Resolution and FPS¶
Settings → Video:
| Setting | Value |
|---|---|
| Base (Canvas) Resolution | Match your monitor (e.g., 1920×1080) |
| Output (Scaled) Resolution | 1920×1080 (or 1280×720 for lower bitrate streams) |
| Downscale Filter | Lanczos (best quality) or Bilinear (fastest) |
| Common FPS | 60 (or 30 if bandwidth-limited) |
For most Twitch streams: 1080p60 or 720p60 at 6000 Kbps. 1080p60 at 6000 Kbps is pushing it for fast-motion content — if you're seeing compression artifacts, drop to 720p60.
Scene Setup¶
A basic streaming setup uses two scenes at minimum:
Live scene — your main content: - Game Capture or Window Capture (Windows/macOS) or Screen Capture (Linux/Wayland) - Browser Source for alerts/overlays - Audio input (mic) - Desktop audio
BRB/Starting Soon scene — a static image or video loop for transitions.
Add sources with the + button in the Sources panel. Order matters — sources higher in the list appear on top.
Audio Setup¶
Settings → Audio: - Desktop Audio: set to your main audio output - Mic/Auxiliary Audio: set to your microphone
In the mixer, use the gear icon per source to apply filters: - Noise Suppression (RNNoise): reduces background noise significantly - Noise Gate: cuts audio below a threshold — stops background hiss when you're not talking - Compressor: evens out volume levels - Gain: boosts a quiet mic
Apply them in that order. Noise suppression first, gate second, compressor third.
Linux-Specific Notes¶
Wayland capture: OBS on Wayland requires either the PipeWire screen capture plugin or using X11 compatibility mode (obs --use-x11 or setting the env var QT_QPA_PLATFORM=xcb). The Flatpak version handles this better than the native package on some distros.
Virtual camera on Linux:
# Load the v4l2loopback kernel module
sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="OBS Virtual Camera" exclusive_caps=1
# Make it persist across reboots
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo "options v4l2loopback devices=1 video_nr=10 card_label=OBS Virtual Camera exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
Gotchas & Notes¶
- Test your stream before going live. Record a short clip and watch it back. Artifacts in the recording will be worse in the stream.
- Keyframe interval at 2 is required by Twitch. Other values cause issues with their ingest servers.
- High CPU Usage Preset for x264 makes streams look better but uses more CPU.
veryfastis usually the sweet spot —fastandmediumare noticeably heavier for marginal quality gain. - NVENC quality has improved significantly. Old advice says x264 is better quality. That was true in 2018. Current NVENC (RTX series) is competitive with x264 at reasonable bitrates.
- OBS logs are in Help → Log Files. When something isn't working, this is where to look first.
See Also¶
- [[linux-file-permissions]]
- [[bash-scripting-patterns]]