I've always used ffmpeg
CLI for screen recording, mostly with x11grab
or kmsgrab
. But after moving to Wayland and especially after compositors began using 10 bit color by default it became increasingly problematic. OBS turned out to be the only reliably working tool for screen recording under Wayland.
I like to do my screen records losslessly and compress after editing. Here is how to achieve that with OBS.
I believe this setup to be OS-independent, it should work fine with either Linux, macOS or Windows.
Profile → New → set profile name → Ok
Settings:
-
Output
- Output Mode: Advanced
-
Recording tab:
- Type: Custom Output (FFmpeg)
- Container Format: matroska or mp4
- Video Encoder: libx264rgb
-
Video Encoder Settings:
colorspace=0 crf=0 preset=ultrafast x264opts=no-scenecut
Some recommend using
qp=0
instead ofcrf=0
. I've never had issues with the latter.
- Audio Encoder: flac
-
Video
- Output (Scaled) Resolution: same as Base (Canvas) Resolution
- FPS: 60 (optional)
-
Advanced
- Color Format: BGRA (8-bit)
- Color Space: sRGB
- Color Range: Full