Hacker News new | past | comments | ask | show | jobs | submit login

For anyone looking to set up a virtual OBS webcam in Arch Linux, here's how I did it:

1. Install headers for your Linux kernel:

  - sudo pacman -S linux56-headers
2. Install v4l2loopback-dkms from AUR:

  - git clone https://aur.archlinux.org/v4l2loopback-dkms.git

  - cd v4l2loopback-dkms

  - makepkg -scCi
3. Create a virtual video capture device:

  - sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="OBS Cam" exclusive_caps=1
4. Set up a virtual audio device to avoid latency:

  - sudo modprobe snd-aloop index=10 id="OBS Mic"

  - pacmd 'update-source-proplist alsa_input.platform-snd_aloop.0.analog-stereo device.description="OBS Mic"'
5. Run ffmpeg:

  ffmpeg -an -probesize 32 -analyzeduration 0 -listen 1 -i rtmp://127.0.0.1:1935/live/test -f v4l2 -vcodec rawvideo /dev/video10
6. Setup OBS to stream to ffmpeg:

  - File > Settings > Stream, set Service to "Custom..." and "Server" to `rtmp://127.0.0.1:1935/live/test`
7. Setup low latency streaming:

  - File > Settings > Output, set Buffer Size to 0, CPU Usage Preset to "ultrafast" and Tune to "zerolatency".
8. Start Streaming in OBS.

9. Select your virtual camera and audio devices in Google Meet / Zoom / etc.

I get virtually no latency with this setup but I'm running an AMD Ryzen 7 2700X with 32GB of RAM. As always, YMMV.




Or you can use the obs v4l2loopback plugin to replace steps 5 and 6: https://github.com/CatxFish/obs-v4l2sink


Thanks! I’ll try this out.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: