Subject: wf-recorder: Stream sent to v4l2loopback device not readable
Package: wf-recorder
Version: 0.3-1+b1
Severity: normal
I had been using wf-recorder to stream my Wayland session via ffmpeg
to a different computer¹, but after the update from 0.2.1 to 0.3 (and
even after the prompt described in #1015842), it seems to me the
output is not correctly formatted. If I grab the screen and redirect
to my v4l2loopback device, I get:
$ wf-recorder -g '0,32 960x720' -t --muxer=v4l2 --pixel-format=yuv420p
--file=/dev/video10
Output file "/dev/video10" exists. Overwrite? Y/n: y
selected region 0,32 960x720
Setting codec option: crf=20
Setting codec option: preset=ultrafast
Setting codec option: tune=zerolatency
Using video filter: null
[libx264 @ 0xffff74001c30] using SAR=1/1
[libx264 @ 0xffff74001c30] MB rate (2700000000) > level limit (16711680)
[libx264 @ 0xffff74001c30] using cpu capabilities: ARMv8 NEON
[libx264 @ 0xffff74001c30] profile Constrained Baseline, level 6.2, 4:2:0,
8-bit
Output #0, video4linux2,v4l2, to '/dev/video10':
Stream #0:0: Video: h264, yuv420p(pc), 960x720 [SAR 1:1 DAR 4:3], q=2-31
However, when I try to open the /dev/video10 device with a client
program, I get no usable data. Using guvcvideo:
$ guvcview -d /dev/video10
V4L2_CORE: Unable to find parent usb device.V4L2_CORE: Unable to find
parent usb device.V4L2_CORE: Unable to find parent usb device.GUVCVIEW: version
2.0.7
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
{ VIDIOC_TRY_FMT (invalid values): width = 0, height = 0 }
v4L2_CORE: Unable to enumerate frame sizes :Invalid argument
{ VIDIOC_TRY_FMT (invalid values): width = 0, height = 0 }
v4L2_CORE: Unable to enumerate frame sizes :Invalid argument
{ VIDIOC_TRY_FMT (invalid values): width = 0, height = 0 }
v4L2_CORE: Unable to enumerate frame sizes :Invalid argument
{ VIDIOC_TRY_FMT (invalid values): width = 0, height = 0 }
v4L2_CORE: Unable to enumerate frame sizes :Invalid argument
V4L2_CORE: failed to subscribe events for control 0x00980001: Inappropriate
ioctl for device
V4L2_CORE: failed to subscribe events for control 0x0098f900: Inappropriate
ioctl for device
V4L2_CORE: failed to subscribe events for control 0x0098f901: Inappropriate
ioctl for device
V4L2_CORE: failed to subscribe events for control 0x0098f902: Inappropriate
ioctl for device
V4L2_CORE: failed to subscribe events for control 0x0098f903: Inappropriate
ioctl for device
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
unlock
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5668:(snd_config_expand) Unknown parameters {AES0 0x6 AES1
0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6
AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_direct.c:1284:(snd1_pcm_direct_initialize_slave) unable to
install hw params
ALSA lib pcm_dmix.c:1044:(snd_pcm_dmix_open) unable to initialize slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
unlock
V4L2_CORE: (VIDIOC_QUERYBUF) Unable to query buffer[3]: Invalid argument
try with read method instead
V4L2_CORE: (VIDIOC_QBUFS) Unable to query buffers: Invalid argument
GUCVIEW: could not set the defined stream format
GUCVIEW: trying first listed stream format
V4L2_CORE: (VIDIOC_QUERYBUF) Unable to query buffer[3]: Invalid argument
try with read method instead
V4L2_CORE: (VIDIOC_QBUFS) Unable to query buffers: Invalid argument
GUCVIEW: also could not set the first listed stream format
GUVCVIEW: Video capture failed
GUVCVIEW (0): Guvcview error
could not start a video stream in the device
V4L2_CORE: failed to unsubscribe events: Inappropriate ioctl for device
I am aware there are several bits in this log not related to
wf-recorder's output (i.e. the ALSA bits -- my laptop lacks sound
support), butit shows the loopback device is not "happy" with its input.
Thanks!
¹ https://gwolf.org/2022/05/using-a-rpi-as-a-display-adapter.html
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: arm64 (aarch64)
Kernel: Linux 5.16.11-yogurtu (SMP w/8 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages wf-recorder depends on:
ii libavcodec-extra59 [libavcodec59] 7:5.0.1-3+b1
ii libavdevice59 7:5.0.1-3+b1
ii libavfilter8 7:5.0.1-3+b1
ii libavformat59 7:5.0.1-3+b1
ii libavutil57 7:5.0.1-3+b1
ii libc6 2.33-7
ii libgcc-s1 12.1.0-5
ii libpulse0 15.0+dfsg1-4+b1
ii libstdc++6 12.1.0-5
ii libswresample4 7:5.0.1-3+b1
ii libwayland-client0 1.20.0-1
ii sgml-base 1.30
wf-recorder recommends no packages.
wf-recorder suggests no packages.
-- no debconf information