Using a Sony alpha camera as a webcam in Ubuntu
- Make sure you have ffmpeg:
sudo apt-get install ffmpeg
- Install latest release gphoto2: https://github.com/gonzalo/gphoto2-updater
- Install https://github.com/umlaeute/v4l2loopback from source (see README.md)
- On Sony alpha camera: change USB connection in settings on camera to PC Remote.
- Enable kernel extension:
sudo modprobe v4l2loopback exclusive_caps=1 max_buffers=2
- Launch webcam:
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 8 -f v4l2 /dev/video2
- Change
/dev/video2/
to device mentioned inv4l2-ctl --list-devices
- Change
It doesn't work anymore
- Did you start the kernel module?
sudo modprobe v4l2loopback exclusive_caps=1 max_buffers=2
- When after upgrading the v4l2loopback kernel module will not load: build from source again, but start with a
make clean
make
sudo make install
sudo depmod -a
Main source: