- Video 4 Linux loopback device kernel module (
v4l2loopback
) - Source: https://github.com/umlaeute/v4l2loopback (You might find builds in your distro's repos - I'm using Fedora so had to build it myself using https://github.com/danielkza/v4l2loopback-fedora/) - gPhoto2 - this is what allows you to access your cameras live feed over USB - this was available in Fedora's repos.
- GStreamer or ffmpeg - this is what lets you stream the output from gPhoto2 into the loopback device.
It's been a little while since I set it all up so I can't remember all of the installation details, which will probably be different for your distro anyway unless you're using Fedora. Apologies if I have forgotten something as wel.
- Connect your camera, ensuring that if the camera is automatically mounted by your operating system that you unmount it, otherwise you will get "device busy" errors.
- Make sure the loopback kernel module is loaded:
This should create a new video device in
sudo modprobe v4l2loopback
/dev
, the device name will depend on what other video devices are already present (E.g. built-in laptop webcam). You can see all the devices by running the following:Your new loopback device should be the one with the highest number.ls /dev/video*
- Stream the output from your camera to the virtual video device
Using GStreamer:Using ffmpeg:gphoto2 --stdout --capture-movie | gst-launch-0.10 fdsrc ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! v4l2sink device=/dev/video0
(Ensure that the binary names and device names match what is on your system)gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
You should now be able to select the Dummy Video Device in your video capturing software of choice (E.g. Zoom, Hangouts, etc.)
Just wanted to say, this is working great on Pop OS 20.10 using the same Canon 70D. Thank you so much @jessarcher for posting this, I never would have thought I could get this rolling otherwise!