OBS, Screen Recording & Streaming
OBS Studio is the most popular open-source screen recording and live streaming software. This article explains how to install and configure OBS on Ubuntu 26.04.
Installing OBS Studio
Method 1: Via apt
sudo apt install obs-studio -yMethod 2: Via Flatpak (Recommended, more up-to-date)
flatpak install flathub com.obsproject.Studio -yMethod 3: Via PPA for the Latest Version
sudo add-apt-repository ppa:obsproject/obs-studio -y
sudo apt update
sudo apt install obs-studio -yFirst Launch Configuration
Launch OBS:
obs
# Or for the Flatpak version
flatpak run com.obsproject.StudioOn first launch, OBS will run the auto-configuration wizard:
- Choose your purpose: Optimize for recording or Optimize for streaming
- Set video parameters: resolution and frame rate
- Automatic system performance test
Wayland Support
Ubuntu 26.04 uses the Wayland desktop by default. OBS under Wayland needs PipeWire to capture the screen:
# Ensure PipeWire-related packages are installed
sudo apt install pipewire pipewire-pulse xdg-desktop-portal-gnome -yWhen adding a screen capture source in OBS, select Screen Capture (PipeWire).
Recording Settings
Adding Sources
Click the + button in the Sources area to add:
- Screen Capture (PipeWire) — Capture the entire screen
- Window Capture (PipeWire) — Capture a single window
- Audio Output Capture (PulseAudio) — Capture system audio
- Audio Input Capture (PulseAudio) — Capture microphone
- Image — Add a watermark or background
- Text (FreeType 2) — Add text overlay
Recommended Recording Settings
Go to Settings > Output > Recording:
| Setting | Recommended Value |
|---|---|
| Output Mode | Advanced |
| Recording Format | MKV (can be remuxed to MP4 later) |
| Encoder | NVIDIA NVENC H.264 (NVIDIA) / VAAPI H.264 (AMD) / x264 (CPU) |
| Bitrate | 10000-30000 Kbps |
| Keyframe Interval | 2 seconds |
Video settings (Settings > Video):
| Setting | Recommended Value |
|---|---|
| Base Resolution | 1920x1080 |
| Output Resolution | 1920x1080 |
| Frame Rate | 60 FPS |
| Downscale Filter | Lanczos |
Using GPU-Accelerated Encoding
NVIDIA users:
# The NVENC encoding library ships with the NVIDIA driver; its version must match the driver.
# Installing nvidia-driver-XXX automatically pulls in the matching libnvidia-encode-XXX.
# If it is missing, install the one matching your installed driver, e.g. for driver 580:
sudo apt install libnvidia-encode-$(nvidia-smi --query-gpu=driver_version --format=csv,noheader | cut -d. -f1) -ySelect NVIDIA NVENC H.264 as the encoder in OBS to significantly reduce CPU usage.
AMD users: Select FFMPEG VAAPI H.264 as the encoder in OBS.
Live Streaming
Streaming to Twitch
- Get your Stream Key from your Twitch dashboard
- In OBS, go to Settings > Stream
- Select Twitch as the service and paste your stream key
Streaming to YouTube
- Get the stream key from YouTube Studio > Go Live
- In OBS, go to Settings > Stream
- Select YouTube - RTMPS and enter the stream key
Recommended Streaming Settings
| Setting | Recommended Value |
|---|---|
| Encoder | NVENC or VAAPI |
| Bitrate | 4000-8000 Kbps |
| Keyframe Interval | 2 seconds |
| Preset | Quality or Max Quality |
| Output Resolution | 1920x1080 |
| Frame Rate | 30 or 60 FPS |
Custom RTMP Streaming
Server: rtmp://your-streaming-server/live/
Stream Key: your-stream-keyScene and Source Management
Creating Multiple Scenes
OBS supports creating multiple scenes for quick switching:
- Gaming scene: Game capture + webcam + chat overlay
- Chat scene: Webcam + background image
- BRB scene: Away screen + background music
OBS Hotkeys
Configure in Settings > Hotkeys:
| Function | Suggested Hotkey |
|---|---|
| Start Recording | Ctrl + F9 |
| Stop Recording | Ctrl + F10 |
| Start Streaming | Ctrl + F11 |
| Scene Switching | F1 / F2 / F3 |
Other Screen Recording Tools
SimpleScreenRecorder
A lightweight screen recording tool suitable for simple needs:
sudo apt install simplescreenrecorder -yGNOME Built-in Screen Recording
The GNOME desktop can record the screen directly with a keyboard shortcut:
Ctrl + Shift + Alt + Rto start/stop recording- Recordings are saved to the
~/Videos/Screencasts/directory
wf-recorder Command-Line Recording
The Ubuntu 26.04 desktop is a Wayland-only session. FFmpeg’s x11grab does not work under Wayland, and FFmpeg has no pipewire input device, so you cannot use ffmpeg to grab the screen directly. For command-line recording, use the Wayland-capable wf-recorder:
sudo apt install wf-recorder -y
# Record the whole screen (with audio)
wf-recorder -a -f output.mp4
# Record a selected region with slurp
sudo apt install slurp -y
wf-recorder -g "$(slurp)" -f output.mp4For a graphical workflow, just use the GNOME built-in screen recorder above or OBS Studio; both work through the PipeWire screen-sharing portal and natively support Wayland.
GPU-Accelerated Transcoding
# NVIDIA NVENC
ffmpeg -i input.mkv -c:v h264_nvenc -preset p4 -b:v 10M output.mp4
# AMD VAAPI
ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -c:v h264_vaapi -b:v 10M output.mp4MKV to MP4 Conversion
OBS recording is recommended in MKV format (won’t corrupt on power loss). After recording, convert to MP4:
# In OBS: File > Remux Recordings (lossless, fast conversion)
# Or use FFmpeg
ffmpeg -i recording.mkv -codec copy recording.mp4With proper OBS configuration, Ubuntu 26.04 can handle all kinds of screen recording and live streaming needs.