Created
August 1, 2021 17:49
-
-
Save vincens2005/80b21fa86685835a151764844069e3a8 to your computer and use it in GitHub Desktop.
creates a virtual webcam with ffmpeg and v4l2loopback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# WTFPL license | |
# You might need to change /dev/video2 to something different depending on what hardware you have plugged in | |
sudo modprobe v4l2loopback | |
echo "Enter the file path (no spaces):" | |
read filepath | |
echo starting stream... | |
ffmpeg -re -stream_loop -1 -i $filepath -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment