Files
MajorWiki/04-streaming/obs/obs-studio-setup-encoding.md
MajorLinux 6d81e7f020 wiki: add 4 new articles from archive, merge 8 archive notes into existing articles (73 articles)
New: mdadm RAID rebuild, Mastodon instance tuning, Ventoy, Fedora networking/kernel recovery.
Merged: Glacier Deep Archive into rsync, SpamAssassin into hardening checklist,
OBS captions/VLC capture into OBS setup, yt-dlp subtitles/temp fix into yt-dlp.
Updated index.md, README.md, SUMMARY.md with 21 previously missing articles.
Fixed merge conflict in index.md Recently Updated table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:55:53 -04:00

5.7 KiB
Raw Blame History

title, domain, category, tags, status, created, updated
title domain category tags status created updated
OBS Studio Setup and Encoding Settings streaming obs
obs
streaming
encoding
twitch
youtube
linux
published 2026-03-08 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:

# 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

Plugins & Capture Sources

Captions Plugin (Accessibility)

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