Created
May 3, 2023 16:37
-
-
Save jayendra13/b0c99ce46cb9086e9046d01afd2412d7 to your computer and use it in GitHub Desktop.
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
# sample command to capture camera output, makesure ffmpeg is installed | |
ffmpeg -f video4linux2 -i /dev/video0 -vframes 1 -video_size 640x480 test.jpeg | |
# To run the same thing inside the docker image | |
# run docker in privilaged mode with binding appropriate dirs | |
docker run --privileged \ | |
--mount type=bind,source=/dev,target=/dev \ | |
--mount type=bind,source=/home/fatlady,target=/root \ | |
--rm -it alpine /bin/sh | |
# install ffmpeg inside the container | |
apk add ffmpeg | |
# run the same command as above to capture the output | |
ffmpeg -f video4linux2 -i /dev/video0 -vframes 1 -video_size 640x480 test.jpeg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment