Software⏱️ 3 min read📅 2026-06-15

How to Fix: 'v4l2' is not a suitable output format - why does this error appear?

Error analysis and solution for v4l2loopback issue on NixOS.

Quick Answer: The issue arises from the incompatibility of FFmpeg's v4l2 output format with NixOS. To resolve this, use the "raw1394" output format instead.

The error 'v4l2' is not a suitable output format - why does this error appear?

This error occurs when trying to stream camera feed from Arch Linux to OBS, but it stopped working after switching to NixOS.

🔍 Why This Happens

  • The primary reason for this error is that the v4l2loopback module in NixOS has changed its behavior. Previously, it would use a different output format called 'v4l2', which is no longer supported by OBS. The new output format used by v4l2loopback is 'video4linux', which is not compatible with OBS.
  • Another possible reason for this error is that the ffmpeg version installed on NixOS has been updated, and it may not support the old output format 'v4l2' anymore.

🚀 How to Resolve This Issue

Update ffmpeg to a newer version

  1. Step 1: Open a terminal as root and update ffmpeg using the following command: sudo pacman -S --noedit ffmpeg
  2. Step 2: Verify that the updated ffmpeg version is working correctly by running the following command: ffmpeg -i - -vcodec copy -f v4l2 "/dev/$(ls -1 /sys/devices/virtual/video4linux)"
  3. Step 3: If the error persists, try updating OBS to a newer version or using a different streaming software.

Use a different output format with v4l2loopback

  1. Step 1: Open a terminal as root and update v4l2loopback using the following command: sudo modprobe -r v4l2loopback && sudo modprobe v4l2loopback exclusive_caps=1 max_buffer=2
  2. Step 2: Verify that the updated v4l2loopback module is working correctly by running the following command: gphoto2 --stdout --set-config viewfinder=1 --capture-movie | ffmpeg -i - -vcodec copy -threads 1 -f video4linux "/dev/$(ls -1 /sys/devices/virtual/video4linux)"

🎯 Final Words

To resolve the issue, try updating ffmpeg to a newer version or using a different output format with v4l2loopback. If none of these methods work, you may need to seek further assistance from OBS support or a Linux expert.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions