Created
April 8, 2020 06:25
-
-
Save pmarkun/345d00fe860c9cce0681f844beccdc21 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
| MODULE="v4l2loopback" | |
| VIDEO=${1:-lula.mp4} | |
| ARGS="-s 1280x720 -vcodec rawvideo -pix_fmt yuv420p -threads 0" | |
| if lsmod | grep "$MODULE" &> /dev/null ; then | |
| sudo modprobe $MODULE exclusive_caps=1 | |
| else | |
| echo "$MODULE is loaded!" | |
| fi | |
| ffmpeg -re -i bomb/$VIDEO $ARGS -f v4l2 /dev/video2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment