Dear All,
I have upgraded from F33 to F34. Everything is working fine now except the OBS-Studio virtual camera, which is not working.
I am using v4l2loopback, and I see that my camera lights up when I open OBS-Studio, but suddenly it goes off.
There is no problem with my camera, as it works fine on Skype, for instance.
Any ideas?
Thanks in advance,
Paul
On Apr 28, 2021, at 12:54, Paul Smith phhs80@gmail.com wrote:
Dear All,
I have upgraded from F33 to F34. Everything is working fine now except the OBS-Studio virtual camera, which is not working.
I am using v4l2loopback, and I see that my camera lights up when I open OBS-Studio, but suddenly it goes off.
There is no problem with my camera, as it works fine on Skype, for instance.
I don’t believe that v4l2loopback is part of Fedora, are you sure the kernel module is being compiled? Does it use dkms?
— Jonathan Billings
On Thu, Apr 29, 2021 at 1:38 AM Jonathan Billings billings@negate.org wrote:
I have upgraded from F33 to F34. Everything is working fine now except the OBS-Studio virtual camera, which is not working.
I am using v4l2loopback, and I see that my camera lights up when I open OBS-Studio, but suddenly it goes off.
There is no problem with my camera, as it works fine on Skype, for instance.
I don’t believe that v4l2loopback is part of Fedora, are you sure the kernel module is being compiled? Does it use dkms?
Thanks, Jonathan. I meanwhile installed the v4l2loopback-dkms package from
https://copr.fedorainfracloud.org/coprs/sentry/v4l2loopback/
and reboot, but the problem persists.
Any further ideas?
Paul
On Thu, Apr 29, 2021 at 11:31:05AM +0100, Paul Smith wrote:
Thanks, Jonathan. I meanwhile installed the v4l2loopback-dkms package from
https://copr.fedorainfracloud.org/coprs/sentry/v4l2loopback/
and reboot, but the problem persists.
I'd check the dkms build logs in:
/var/lib/dkms/v4l2loopback/${V4L2LOOPBACK_VERSION}/build/make.log
(replace ${V4L2LOOPBACK_VERSION} with the version you have installed, it looks like it is 0.12.5 from the repo)
Looking at the issues in the upstream git repo, it appears to be an issue with the version of GCC not matching the one used to build the kernel. The suggestions were to run 'dnf downgrade gcc' before building. Not sure if that helps.
See this closed issue: https://github.com/umlaeute/v4l2loopback/issues/410
On Thu, Apr 29, 2021 at 1:25 PM Jonathan Billings billings@negate.org wrote:
Thanks, Jonathan. I meanwhile installed the v4l2loopback-dkms package from
https://copr.fedorainfracloud.org/coprs/sentry/v4l2loopback/
and reboot, but the problem persists.
I'd check the dkms build logs in:
/var/lib/dkms/v4l2loopback/${V4L2LOOPBACK_VERSION}/build/make.log
(replace ${V4L2LOOPBACK_VERSION} with the version you have installed, it looks like it is 0.12.5 from the repo)
Looking at the issues in the upstream git repo, it appears to be an issue with the version of GCC not matching the one used to build the kernel. The suggestions were to run 'dnf downgrade gcc' before building. Not sure if that helps.
See this closed issue: https://github.com/umlaeute/v4l2loopback/issues/410
Thanks, Jonathan. Can you detect any problem in the make.log:
------------------------------ # more /var/lib/dkms/v4l2loopback/0.12.5/5.11.16-300.fc34.x86_64/x86_64/log/make.log DKMS make.log for v4l2loopback-0.12.5 for kernel 5.11.16-300.fc34.x86_64 (x86_64 ) Thu Apr 29 09:21:31 AM WEST 2021 Building v4l2-loopback driver... make -C /lib/modules/5.11.16-300.fc34.x86_64/build M=/var/lib/dkms/v4l2loopback/ 0.12.5/build modules make[1]: Entering directory '/usr/src/kernels/5.11.16-300.fc34.x86_64' CC [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.o MODPOST /var/lib/dkms/v4l2loopback/0.12.5/build/Module.symvers CC [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.mod.o LD [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.ko BTF [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.ko Skipping BTF generation for /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback .ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/kernels/5.11.16-300.fc34.x86_64' # ------------------------------
Paul
On Thu, Apr 29, 2021 at 01:36:13PM +0100, Paul Smith wrote:
Thanks, Jonathan. Can you detect any problem in the make.log:
# more /var/lib/dkms/v4l2loopback/0.12.5/5.11.16-300.fc34.x86_64/x86_64/log/make.log DKMS make.log for v4l2loopback-0.12.5 for kernel 5.11.16-300.fc34.x86_64 (x86_64 ) Thu Apr 29 09:21:31 AM WEST 2021 Building v4l2-loopback driver... make -C /lib/modules/5.11.16-300.fc34.x86_64/build M=/var/lib/dkms/v4l2loopback/ 0.12.5/build modules make[1]: Entering directory '/usr/src/kernels/5.11.16-300.fc34.x86_64' CC [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.o MODPOST /var/lib/dkms/v4l2loopback/0.12.5/build/Module.symvers CC [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.mod.o LD [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.ko BTF [M] /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback.ko Skipping BTF generation for /var/lib/dkms/v4l2loopback/0.12.5/build/v4l2loopback .ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/kernels/5.11.16-300.fc34.x86_64'
#
That looks like it built OK. Does 'sudo dkms status v4l2loopback' say everything is OK?
On Thu, Apr 29, 2021 at 1:45 PM Jonathan Billings billings@negate.org wrote:
That looks like it built OK. Does 'sudo dkms status v4l2loopback' say everything is OK?
It seems OK, Jonathan:
$ sudo dkms status v4l2loopback [sudo] password for x: v4l2loopback, 0.12.5, 5.11.16-300.fc34.x86_64, x86_64: installed (original_module exists) $
Paul
On Thu, Apr 29, 2021 at 1:47 PM Paul Smith phhs80@gmail.com wrote:
That looks like it built OK. Does 'sudo dkms status v4l2loopback' say everything is OK?
It seems OK, Jonathan:
$ sudo dkms status v4l2loopback [sudo] password for x: v4l2loopback, 0.12.5, 5.11.16-300.fc34.x86_64, x86_64: installed (original_module exists) $
But when I go to OBS-Studio to configure
Video capture device (V4L2),
only my physical appears listed:
Easy camera 5M.
If I select that camera, I do not get any video on OBS-Studio.
Can the problem be caused by OBS-Studio?
Paul
On Thu, Apr 29, 2021 at 01:47:32PM +0100, Paul Smith wrote:
It seems OK, Jonathan:
$ sudo dkms status v4l2loopback [sudo] password for x: v4l2loopback, 0.12.5, 5.11.16-300.fc34.x86_64, x86_64: installed (original_module exists) $
That 'original_module exists' means that there's already another package providing the driver. I wonder if you have conflicting installs of the package from copr and the one in rpmfusion?
Is the v4l2loopback kernel module loaded? Do you see it in the output of 'lsmod'? Can you run 'modprobe v4l2loopback'? Is there anything in the kernel 'dmesg' after you load it?
On Thu, Apr 29, 2021 at 1:58 PM Jonathan Billings billings@negate.org wrote:
$ sudo dkms status v4l2loopback [sudo] password for x: v4l2loopback, 0.12.5, 5.11.16-300.fc34.x86_64, x86_64: installed (original_module exists) $
That 'original_module exists' means that there's already another package providing the driver. I wonder if you have conflicting installs of the package from copr and the one in rpmfusion?
Is the v4l2loopback kernel module loaded? Do you see it in the output of 'lsmod'? Can you run 'modprobe v4l2loopback'? Is there anything in the kernel 'dmesg' after you load it?
The answers to all your questions is YES, but 'dmesg' returns the following:
--------------------------- [ 263.923694] EDAC amd64: Node 0: DRAM ECC disabled. [ 265.686950] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 265.686995] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys-late' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 366.970723] uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2). [ 366.987741] uvcvideo: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4). ---------------------------
Paul
On Thu, Apr 29, 2021 at 02:17:50PM +0100, Paul Smith wrote:
The answers to all your questions is YES, but 'dmesg' returns the following:
[ 263.923694] EDAC amd64: Node 0: DRAM ECC disabled. [ 265.686950] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 265.686995] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys-late' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 366.970723] uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2). [ 366.987741] uvcvideo: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
I don't see anything in particular wrong with that. The uvcvideo output is probably for your real video device.
Do you see the v4l2loopback device in v4l2-ctrl? For example, I loaded the rpmfusion package 'akmod-v4l2loopback' and enabled the akmods service, and now I see:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
On Thu, Apr 29, 2021 at 3:59 PM Jonathan Billings billings@negate.org wrote:
[ 263.923694] EDAC amd64: Node 0: DRAM ECC disabled. [ 265.686950] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 265.686995] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys-late' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 366.970723] uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2). [ 366.987741] uvcvideo: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
I don't see anything in particular wrong with that. The uvcvideo output is probably for your real video device.
Do you see the v4l2loopback device in v4l2-ctrl? For example, I loaded the rpmfusion package 'akmod-v4l2loopback' and enabled the akmods service, and now I see:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
Thanks, Jonathan. In my case, I get:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
EasyCamera 5M: EasyCamera 5M (usb-0000:01:00.0-7): /dev/video2 /dev/video3 $
Paul
On Thu, Apr 29, 2021 at 4:12 PM Paul Smith phhs80@gmail.com wrote:
On Thu, Apr 29, 2021 at 3:59 PM Jonathan Billings billings@negate.org wrote:
[ 263.923694] EDAC amd64: Node 0: DRAM ECC disabled. [ 265.686950] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 265.686995] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys-late' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 366.970723] uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2). [ 366.987741] uvcvideo: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
I don't see anything in particular wrong with that. The uvcvideo output is probably for your real video device.
Do you see the v4l2loopback device in v4l2-ctrl? For example, I loaded the rpmfusion package 'akmod-v4l2loopback' and enabled the akmods service, and now I see:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
Thanks, Jonathan. In my case, I get:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
EasyCamera 5M: EasyCamera 5M (usb-0000:01:00.0-7): /dev/video2 /dev/video3 $
This may be related:
------------------------------ $ ffmpeg -i /dev/video2 -f v4l2 /dev/video4 ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, video4linux2,v4l2, from '/dev/video2': Duration: N/A, start: 7710.349826, bitrate: 110592 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x360, 110592 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native)) Press [q] to stop, [?] for help [video4linux2,v4l2 @ 0x55c856f6b040] Unable to open V4L2 device '/dev/video4' Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory Error initializing output stream 0:0 -- Conversion failed! $ ------------------------------
Paul
Solved! I will later describe the solution I found for my problem, as I am now in a hurry.
Paul
On Thu, Apr 29, 2021 at 4:18 PM Paul Smith phhs80@gmail.com wrote:
On Thu, Apr 29, 2021 at 4:12 PM Paul Smith phhs80@gmail.com wrote:
On Thu, Apr 29, 2021 at 3:59 PM Jonathan Billings billings@negate.org wrote:
[ 263.923694] EDAC amd64: Node 0: DRAM ECC disabled. [ 265.686950] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 265.686995] systemd-sysv-generator[37295]: SysV service '/etc/rc.d/init.d/livesys-late' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 366.970723] uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2). [ 366.987741] uvcvideo: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
I don't see anything in particular wrong with that. The uvcvideo output is probably for your real video device.
Do you see the v4l2loopback device in v4l2-ctrl? For example, I loaded the rpmfusion package 'akmod-v4l2loopback' and enabled the akmods service, and now I see:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
Thanks, Jonathan. In my case, I get:
$ v4l2-ctl --list-devices OBS Virtual Camera (platform:v4l2loopback-000): /dev/video0
EasyCamera 5M: EasyCamera 5M (usb-0000:01:00.0-7): /dev/video2 /dev/video3 $
This may be related:
$ ffmpeg -i /dev/video2 -f v4l2 /dev/video4 ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, video4linux2,v4l2, from '/dev/video2': Duration: N/A, start: 7710.349826, bitrate: 110592 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x360, 110592 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native)) Press [q] to stop, [?] for help [video4linux2,v4l2 @ 0x55c856f6b040] Unable to open V4L2 device '/dev/video4' Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory Error initializing output stream 0:0 -- Conversion failed! $
Paul
On Thu, Apr 29, 2021 at 4:28 PM Paul Smith phhs80@gmail.com wrote:
Solved! I will later describe the solution I found for my problem, as I am now in a hurry.
The problem appears to be related to OBS-Studio. After having run the following command, the reported problem disappeared:
ffmpeg -i /dev/video1 -f v4l2 /dev/video0
Therefore, I suspect that OBS-Studio does not issue a command like the above -- one has to do that manually.
Paul