Hans Pinckaers — Public notes

A collection of short public notes exported from my private tiddlywiki. Find an overview of all notes here. Feedback? You can reach me at mail@hanspinckaers.com.

Using a Sony alpha camera as a webcam in Ubuntu

hanspinckaers updated 33 days ago created: 05 October 2020
Photography Public
  • 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 in v4l2-ctl --list-devices

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: