Categories
Linux Other Tips

Webcam Ubuntu using Canon EOS R/RP/R5

You can use your Canon EOS R * on Ubuntu as a webcam, we can’t use the canon webcam utils on Ubuntu, but we have another way to do it. I have tested it on the R, RP and R5, I suppose on the R6 it works too and is quite simple;)

First install gphoto and v4 utils:

sudo apt-get install gphoto2 v4l2loopback-utils

Plug in your camera via USB (when the camera mounts automatically, unmount it).

Then run this command to see if your camera is capable of doing this.

gphoto2 --abilities

Result for EOS RP

Then run this to activate the kernel module needed to create a video device from your camera.

sudo modprobe v4l2loopback

Check the video devices you are using with the command

v4l2-ctl --list-devices

Choose a video number not in use, in my case the 6 is not in use. Then run:

gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video6

This will create a video device in /dev/video6, which you can now use in programs like OBS or VLC.

If you see any errors about the device being in use you need to kill the gvfs-gphoto2-volume-monitor process by running:

killall gvfs-gphoto2-volume-monitor

Thanks to https://askubuntu.com/a/915204 although I made some changes 😉