Closed entailz closed 6 months ago
note, even when I don't specify a region (just select a single output; one of three), I still encounter this issue.
So, interestingly, when I specify a framerate of either 30000/1001
as suggested in https://github.com/rigaya/NVEnc/issues/57#issuecomment-405879201 (or 60000/1001
, but no integer value I've tried (30, 60, 100)), via the -r
argument, the "non monotonically" errors go away.
I still have a zwlr_screencopy_frame_v1@5: error 1: invalid buffer format
error, however (currently running on the recreate-on-format-change branch (bf17503987995b4335ffc7764a5d04e0502e8328). On playback, the video seems to have its full duration, but I stop seeing new frames (eyeballing it) quite early on in the recording (if at all?).
Oh, I just realized that is not getting parsed as an expression at all. (at least, that's not how it displays)
Detected output based on geometry: DP-1
selected region 477,436 302x225
Setting codec option: crf=20
Setting codec option: preset=ultrafast
Setting codec option: tune=zerolatency
Framerate: 30000
Using video filter: fps=30000
At this point, I suspect me jumping to conclusions will do more harm than good, as I'm out of my wheelhouse. Here are some more complete logs with WAYLAND_DEBUG=1
, exact command, and system info:
wf-recorder doesn't close immediately if I record fullscreen. the smaller the size of geometry, the sooner it crashes. for example, if I select a small region with slurp wf-recorder closes almost immediately with non monotomically increasing dts to muxer in stream
error, however if I select a larger region it takes slightly longer to error out.
I tried -r 30000/1001 as you suggested above, same results as you.
I'm not able to reproduce this bug. Could it possibly have something to do with the libav/ffmpeg version that wf-recorder is using?
maybe? running ffmpeg
yields:
ffmpeg version n6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.2.1 (GCC) 20230801
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Here I have ffmpeg version N-111822-g8028b8260e
because I built it, with the following options:
configuration: --enable-muxer=rtsp --enable-libmp3lame --enable-libvorbis --enable-libx265 --enable-libx264 --enable-encoder=libx264rgb --enable-encoder=flac --enable-libmp3lame --enable-gpl --enable-libvpx --enable-vaapi --enable-libopus --enable-libdrm --enable-vulkan --enable-libdrm --enable-libpulse
Alright, I've built ffmpeg from https://github.com/FFmpeg/FFmpeg/commit/8028b8260e6d0a4a469529ec5c5d504782a5f875, with those options.
Is there a way to make my locally-built wf-recorder
target that locally built instance of ffmpeg
? (I'd like to avoid mangling existing installs if possible) I'm quite unfamiliar with... well, frankly the entire build ecosystem, and I appear to be looking in the wrong places for info.
You should point PKG_CONFIG_PATH to the location of all the relevant .pc files when running meson to build wf-recorder, such as $prefix/lib/pkgconfig/
, where $prefix
is the prefix you used when installing ffmpeg. Then, you will want to set LD_LIBRARY_PATH to $prefix/lib/
when running wf-recorder.
all right, ran
#ffmpeg dir
./configure --enable-muxer=rtsp --enable-libmp3lame --enable-libvorbis --enable-libx265 --enable-libx264 --enable-encoder=libx264rgb --enable-encoder=flac --enable-libmp3lame --enable-gpl --enable-libvpx --enable-vaapi --enable-libopus --enable-libdrm --enable-vulkan --enable-libdrm --enable-libpulse --disable-doc --prefix=/home/johnp/pkg_builing/bin
make
make install
#wf-recorder dir
export PKG_CONFIG_PATH="/home/johnp/pkg_builing/bin/lib/pkgconfig/"
export LD_LIBRARY_PATH="/home/johnp/pkg_builing/bin/lib/"
meson build --prefix=/home/johnp/pkg_building/bin --buildtype=release
ninja -C build
./build/wf-recorder -f ./test.mp4
and received identical results. (I include the steps because I'm not 100% sure how to verify the version wf-recorder
is using at any given time)
I wonder if this has something to do with the refresh rate of the output or maybe variable refresh rates. Can everyone interested say what refresh rate they're using and whether or not they use a monitor with VRR enabled?
Sure, I've mostly been attempting to record on a 3440x1440@99.99800
display with vrr: 0
. Though I also encounter the error on my other monitors.
(E: incidentally, recording whole displays at a time, with the rate reported by hyprctl monitors
specified explicitly via -r
does not resolve the zwlr_screencopy_frame_v1@5: error 1: invalid buffer format
error (it does prevent the "non monotonically", errors, same as providing the other rates))
Does --no-dmabuf
help at all?
It does not appear to have any effect. log w/ WAYLAND_DEBUG=1
(E: ditto for --no-damage
, while I'm at it.) (Also note, I'm heading off to sleep, so my next response will likely be delayed, relative to the others. Ty for all the help investigating today!)
@entailz I just got to this issue and looked at your WAYLAND_DEBUG log, seems like this is a duplicate of #250
@ammen99 thanks! fixed for me.
The most recent 2 commits from #251 resolved the issue for me as well. Thanks!
Application provided invalid, non monotonically increasing dts to muxer in stream
Currently using Hyprland (wl-roots based compositor).This error only occurs if I select a smaller area on the screen with slurp, it doesnt occur if i select a larger portion of the screen. Similarly, recording fullscreen works fine.