Skip to content

Instantly share code, notes, and snippets.

@norcalli
Created August 31, 2020 16:26
Show Gist options
  • Save norcalli/d1e20d73f3f22e6da3916caab6a19852 to your computer and use it in GitHub Desktop.
Save norcalli/d1e20d73f3f22e6da3916caab6a19852 to your computer and use it in GitHub Desktop.

v4l2 plugin installation

Here's some notes for using the v4l2loopback with linux:

  • As a prerequisite, you need to install v4l2loopback https://github.com/umlaeute/v4l2loopback . For Arch users, there's v4l2loopback-dkms in community (not even AUR). I would check apt/whatever you're using first if it's available.
  • For the installation of the plugin itself (https://github.com/CatxFish/obs-v4l2sink), I used the AUR package obs-v4l2sink, so I can't really help much with that. The non -git version worked fine for me if you're also on Arch.
  • After installation, you'll need to actually create a v4l2loopback device. More details are described here https://github.com/umlaeute/v4l2loopback#run , but the gist is to run sudo modprobe v4l2loopback video_nr=5 exclusive_caps=1. The video_nr=5 tells it to create /dev/video5. You may not need exclusive caps, but I personally did for Chrome/FF to work properly. NOTE: You are loading a kernel module, which you can only do once, so if you want to change a setting or change the device number or whatever, you have to do sudo rmmod v4l2loopback first.
  • I would now set permissions so you don't need sudo by doing sudo chown $USER:$USER /dev/video5
  • After installation, restart/start OBS.
  • Click Tools in the top menu and v4l2sink and point it at /dev/video5 and press start to start streaming to it. Image here
    • As far as color settings go, the default is fine (YUV420). Image here

Testing on hopin.to

Now to test it, you can go to our session in the dry run place https://app.hopin.to/events/speaker-dry-run/sessions

Click Test session Click share audio + video

On firefox, the prompt will pop up to ask what camera to use Prompt The name will look like Dummy video device 0x0000 Say yes to all permissions and it should work. Your video will likely be mirrored horizontally, so you'll probably have to mirror your output in OBS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment