I am trying to follow this guide to stream video output from a DSLR camera to twitch via the command line. There appears to be a straightforward way to do it using raspivid
https://medium.com/nerdery/dslr-webcam-setup-for-linux-9b6d1b79ae22
The problem I have is that despite trying every version of rasbian I can get my hands on... NONE of them will let me install the package
v4l2loopback-dkms
After fresh-install booting either 34/64 bit versions of rasbian that were flashed using the official Raspi imager tool, the output is always the same. I'm using a Raspi 3 B v1.2 and a 32gb SD card. No overclocking or other customizations / settings other than wifi setup.
The only things I did before this were:
sudo apt-get update
sudo apt-get upgrade
pi@raspberrypi:~ $ sudo apt-get install gphoto2 v4l2loopback-utils v4l2loopback-dkms ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
ffmpeg is already the newest version (7:4.1.6-1~deb10u1+rpt1).
The following additional packages will be installed:
dkms gstreamer1.0-tools libcdk5nc6 raspberrypi-kernel-headers
Suggested packages:
python3-apport menu gthumb
The following NEW packages will be installed:
dkms gphoto2 gstreamer1.0-tools libcdk5nc6 raspberrypi-kernel-headers v4l2loopback-dkms v4l2loopback-utils
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.5 MB of archives.
After this operation, 232 MB of additional disk space will be used.
Do you want to continue? [Y/n] yes
Get:1 http://deb.debian.org/debian buster/main arm64 dkms all 2.6.1-4 [74.4 kB]
Get:2 http://deb.debian.org/debian buster/main arm64 libcdk5nc6 arm64 5.0.20180306-3 [108 kB]
Get:3 http://deb.debian.org/debian buster/main arm64 gphoto2 arm64 2.5.20-3 [189 kB]
Get:4 http://deb.debian.org/debian buster/main arm64 gstreamer1.0-tools arm64 1.14.4-1 [1,109 kB]
Get:5 http://archive.raspberrypi.org/debian buster/main arm64 raspberrypi-kernel-headers arm64 1.20201022-1 [35.0 MB]
Get:6 http://deb.debian.org/debian buster/main arm64 v4l2loopback-dkms all 0.12.1-1 [34.6 kB]
Get:7 http://deb.debian.org/debian buster/main arm64 v4l2loopback-utils all 0.12.1-1 [20.0 kB]
Fetched 36.5 MB in 33s (1,123 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 90547 files and directories currently installed.)
Preparing to unpack .../0-dkms_2.6.1-4_all.deb ...
Unpacking dkms (2.6.1-4) ...
Selecting previously unselected package libcdk5nc6:arm64.
Preparing to unpack .../1-libcdk5nc6_5.0.20180306-3_arm64.deb ...
Unpacking libcdk5nc6:arm64 (5.0.20180306-3) ...
Selecting previously unselected package gphoto2.
Preparing to unpack .../2-gphoto2_2.5.20-3_arm64.deb ...
Unpacking gphoto2 (2.5.20-3) ...
Selecting previously unselected package gstreamer1.0-tools.
Preparing to unpack .../3-gstreamer1.0-tools_1.14.4-1_arm64.deb ...
Unpacking gstreamer1.0-tools (1.14.4-1) ...
Selecting previously unselected package raspberrypi-kernel-headers.
Preparing to unpack .../4-raspberrypi-kernel-headers_1.20201022-1_arm64.deb ...
Unpacking raspberrypi-kernel-headers (1.20201022-1) ...
Selecting previously unselected package v4l2loopback-dkms.
Preparing to unpack .../5-v4l2loopback-dkms_0.12.1-1_all.deb ...
Unpacking v4l2loopback-dkms (0.12.1-1) ...
Selecting previously unselected package v4l2loopback-utils.
Preparing to unpack .../6-v4l2loopback-utils_0.12.1-1_all.deb ...
Unpacking v4l2loopback-utils (0.12.1-1) ...
Setting up libcdk5nc6:arm64 (5.0.20180306-3) ...
Setting up dkms (2.6.1-4) ...
Setting up raspberrypi-kernel-headers (1.20201022-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.72+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.72-v7+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.72-v7l+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.72-v8+
Setting up gstreamer1.0-tools (1.14.4-1) ...
Setting up gphoto2 (2.5.20-3) ...
Setting up v4l2loopback-dkms (0.12.1-1) ...
Loading new v4l2loopback-0.12.1 DKMS files...
It is likely that 5.4.51-v8+ belongs to a chroot's host
Building for 5.4.72+, 5.4.72-v7+, 5.4.72-v7l+ and 5.4.72-v8+
Building initial module for 5.4.72+
Error! Bad return status for module build on kernel: 5.4.72+ (aarch64)
Consult /var/lib/dkms/v4l2loopback/0.12.1/build/make.log for more information.
dpkg: error processing package v4l2loopback-dkms (--configure):
installed v4l2loopback-dkms package post-installation script subprocess returned error exit status 10
Setting up v4l2loopback-utils (0.12.1-1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
v4l2loopback-dkms
I have literally been trying to get this working for a week. I was able to get the packages installed using Ubuntu Server 20.04, but then I lose access to raspi-config
and even though there's a version of raspivid
that's ported to ubuntu... because I can't go through the config and "enable the camera" raspivid remains useless.
I feel like I'm taking crazy pills on this one because lots of people have clearly gotten what I want working... yet I'm running into undocumented and unclear roadblocks.
Please help. I just want to stream video from my DSLR with my raspi so I don't slow down my laptop with OBS studio.