sudo apt-get install $(cat debian debian.$HOSTNAME)
Install components, a colour scheme and a window manager:
./stow -vt ~ pkgs/* pkgs.colour/palenight pkgs.wm/bspwm
Apply installed colour scheme either by restarting X or running:
cat ~/.Xresources.d/* | xrdb
Install the following packages:
v4l2 kernel module by running the following command and
rebooting the host machine.
sudo modprobe v4l2loopback
Plug in the camera and start capturing video.
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
Make sure the camera is not in use by another application; testing this on GNOME I had to "eject" it using the file manager.
Preview the video output stream using VLC like so:
Don’t forget to remove the lens cap and focus the lens. Experiment with different shooting modes and other settings for best results.
As it is, you’d have to run modprobe to enable the module again before every reboot for this to work. To enable the module permanently:
echo v4l2loopback | sudo tee -a /etc/modules` echo options v4l2loopback exclusive_caps=1 max_buffers=2 | sudo tee -a /etc/modprobe.d/v4l2loopback.conf
Tested with Canon EOS 1200D on Debian Sid (unstable), January 2021.
Copyright (C) 2021 Gregory Chamberlain
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.