Skip to content

Instantly share code, notes, and snippets.

@thomasfaingnaert
Last active March 28, 2019 22:42
Show Gist options
  • Save thomasfaingnaert/35ed8ca943e0d839dfdc7aa2dadf8267 to your computer and use it in GitHub Desktop.
Save thomasfaingnaert/35ed8ca943e0d839dfdc7aa2dadf8267 to your computer and use it in GitHub Desktop.

Installation

sudo apt install linux-headers-$(uname -r)
sudo apt install v4l2loopback-dkms
sudo modprobe v4l2loopback exclusive_caps=1

Video file

VIDEO=<video-file>
ffmpeg -re -i $VIDEO -f v4l2 /dev/video1

Video file (loop)

VIDEO=<video-file>
ffmpeg -re -f concat -safe 0 -i <(for i in {1..9999}; do printf "file '%s'\n" $(pwd)/$VIDEO; done) -f v4l2 /dev/video1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment