I recently got an Canon EOS 400D to use as a webcam for recording videos. I checked gphoto2
documentation to make sure that it can work as a webcam. The documentation says "Yes" for the Liveview/webcam column for 400D:

I used THIS YouTube tutorial to set it up and run it as a webcam. Things I did:
- Install
gphoto2
, v4l2loopback-utils
, and ffmpeg
- Unload
v4l2loopback
using: sudo rmmod v4l2loopback
- Activate v4l2loopback using: s
udo modprobe v4l2loopback exclusive_caps=1 max_buffers=2
- Stream camera:
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2
However, I keep running into an error with gphoto2 --stdout --capture-movie
Capturing preview frames as movie to 'stdout'. Press Ctrl-C to abort.
*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0
(Device or resource busy). Make sure no other program
(gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx,
stv680, spca50x) is using the device and you have read/write access to
the device.
ERROR: Movie capture error... Exiting. Movie capture
finished (0 frames)
I don't understand. Have I read the documentation wrong and there's no way 400D can work as a webcam? or am I missing something?
I'm using:
gphoto2 2.5.27
libgphoto2 2.5.27
libgphoto2_port 0.12.0
Ubuntu 22.04.1 LTS x86_64 on wayland
Kernel: 5.15.0-56-generic
CPU: Intel i7-8565U (8) @ 4.600GHz
GPU: Intel WhiskeyLake-U GT2 [UHD Gr
GPU: AMD ATI Radeon 540/540X/550/550