Skip to content

Instantly share code, notes, and snippets.

@moritzmhmk
Created July 9, 2019 05:54
Show Gist options
  • Save moritzmhmk/251077bb0d21f01efa91cacdc28c5a81 to your computer and use it in GitHub Desktop.
Save moritzmhmk/251077bb0d21f01efa91cacdc28c5a81 to your computer and use it in GitHub Desktop.
[Unit]
Description=Set up loopback cameras
[Service]
ExecStartPre=/sbin/modprobe v4l2loopback devices=3
ExecStart=/usr/bin/ffmpeg -f video4linux2 -input_format yuv420p -video_size 1280x720 -i /dev/video0 -codec copy -f v4l2 /dev/video1 -codec copy -f v4l2 /dev/video2 -codec copy -f v4l2 /dev/video3
Restart=always
RestartSec=2
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment