Skip to content

Instantly share code, notes, and snippets.

@saisasidhar
Created December 1, 2020 15:32
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save saisasidhar/fb79849a4372f752a21dff6a1ada5ef1 to your computer and use it in GitHub Desktop.
Save saisasidhar/fb79849a4372f752a21dff6a1ada5ef1 to your computer and use it in GitHub Desktop.
Canon EOS as video feed in Arch Linux
➜ uname -r
# get installed kernel version
➜ pacman -S linux-headers
# select kernel version
# install v4l2 loopback driver with DKMS infrastructure
➜ pacman -S v4l2loopback-dkms
➜ sudo modprobe v4l2loopback
➜ v4l2-ctl --list-devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
	/dev/video2
# use /dev/videoX listed as platform:v4l2loopback later in gphoto command
➜ pacman -S gphoto2
➜ gphoto2 --auto-detect
# displays connected camera
➜ gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2
# /dev/video2 will contain the video feed from EOS camera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment