- Fixed 4 broken markdown links (bad relative paths in See Also sections) - Corrected n8n port binding to 127.0.0.1:5678 (matches actual deployment) - Updated SnapRAID article with actual majorhome paths (/majorRAID, disk1-3) - Converted 67 Obsidian wikilinks to relative markdown links or plain text - Added YAML frontmatter to 35 articles missing it entirely - Completed frontmatter on 8 articles with missing fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
158 lines
5.8 KiB
Markdown
158 lines
5.8 KiB
Markdown
---
|
||
title: "OBS Studio Setup and Encoding Settings"
|
||
domain: streaming
|
||
category: obs
|
||
tags: [obs, streaming, encoding, twitch, youtube, linux]
|
||
status: published
|
||
created: 2026-03-08
|
||
updated: 2026-03-08
|
||
---
|
||
|
||
# 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:**
|
||
```bash
|
||
# 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:**
|
||
|
||
```bash
|
||
# 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
|
||
```
|
||
|
||
## Plugins & Capture Sources
|
||
|
||
### Captions Plugin (Accessibility)
|
||
|
||
[OBS Captions Plugin](https://github.com/ratwithacompiler/OBS-captions-plugin) adds real-time closed captions to streams using speech-to-text. Viewers can toggle captions on/off in their player — important for accessibility and for viewers watching without sound.
|
||
|
||
Install from the plugin's GitHub releases page, then configure in Tools → Captions.
|
||
|
||
### VLC Video Source (Capture Card)
|
||
|
||
For capturing from an Elgato 4K60 Pro MK.2 (or similar DirectShow capture card) via VLC as an OBS source, use this device string:
|
||
|
||
```
|
||
:dshow-vdev=Game Capture 4K60 Pro MK.2
|
||
:dshow-adev=Game Capture 4K60 Pro MK.2 Audio (Game Capture 4K60 Pro MK.2)
|
||
:dshow-aspect-ratio=16:9
|
||
:dshow-chroma=YUY2
|
||
:dshow-fps=0
|
||
:no-dshow-config
|
||
:no-dshow-tuner
|
||
:live-caching=0
|
||
```
|
||
|
||
Set `live-caching=0` to minimize capture latency. This is useful when OBS's native Game Capture isn't an option (e.g., capturing a separate machine's output through the card).
|
||
|
||
## 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.** `veryfast` is usually the sweet spot — `fast` and `medium` are 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](../../01-linux/files-permissions/linux-file-permissions.md)
|
||
- [bash-scripting-patterns](../../01-linux/shell-scripting/bash-scripting-patterns.md)
|