Closed Yasso9 closed 4 months ago
I have this same error. I've made sure vaapi is enabled. Could be we need to set the --codec
?
I have tested with all --codec values (auto, avc, hevc, vp8, vp9) on both iGPU and GPU and I still have the same error.
I tested on another computer with an intel CPU and Iris Xe iGPU, and it works with vaapi drivers installed. I have the same system on both computer.
I've improved the error messages in latest git, curious to see what you get now. It's also possible (but maybe unlikely) that this was the root cause as #60, which I just pushed a fix for, so please retest.
Thanks for your answer
I just reinstalled wl-screenrec-git, and I still have the same error, but I have one more message before the program exit
Using output DP-1
Opening libva device from DRM device /dev/dri/renderD128
[AVHWFramesContext @ 0x5832e5fa57c0] Failed to create surface: 14 (the requested RT Format
is not supported).
[AVHWFramesContext @ 0x5832e5fa57c0] Unable to allocate a surface from internal buffer poo
l.
failed to create encoder: Failed to create vaapi frame context for capture surfaces of for
mat X2RGB10LE 3840x2160
Here are some more information if you need them:
I have 2 graphics cards :
I tested to run the program on both GPU using the arguments --dri-device /dev/dri/renderD129
and --dri-device /dev/dri/renderD128
. I have the same error on both.
When I try to run wf-recorder with the arg --device /dev/dri/renderD128
I have the following error that look like the one on wl-screenrec :
using VA-API, trying to enable DMA-BUF capture...
enabled DMA-BUF capture, device /dev/dri/renderD128
selected region 0,0 0x0
Setting codec option: qp=25
[AVHWFramesContext @ 0x77fdcc2e5d80] Failed to create surface: 14 (the requested RT Format
is not supported).
[AVHWFramesContext @ 0x77fdcc2e5d80] Unable to allocate a surface from internal buffer poo
l.
Cannot create hw frames context: Cannot allocate memory
But when using --device /dev/dri/renderD129
it works perfectly, whereas wl-screenrec launch the same error
using VA-API, trying to enable DMA-BUF capture...
compositor running on different device, disabling DMA-BUF
selected region 0,0 0x0
Failed to find AV format for0Using video filter: hwupload,scale_vaapi=format=nv12:out_rang
e=full
[hevc_vaapi @ 0x7f0b2c002000] No quality level set; using default (25).
[hevc_vaapi @ 0x7f0b2c002000] Driver does not support some wanted packed headers (wanted 0
xd, found 0x1).
Choosing sample format fltp for audio codec aac
Output #0, matroska:
Stream #0:0: Video: hevc (Main), vaapi(pc), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
Using PulseAudio device: alsa_output.pci-0000_03_00.1.hdmi-stereo-extra3.monitor
If you need more information about my system, just ask, I will try to do my best to answer. I really like the program on my Intel laptop, more than wf-recorder, so it can be pretty cool if it works on my desktop too.
compositor running on different device, disabling DMA-BUF
it seems they don't use dmabuf at all in this situation, which wl-screenrec always uses. This is somewhat related to #15.
I think the only option to get wl-screenrec (barring wl-screenrec shm support, which I have little interest in adding as wf-recorder already fits this usecase well) is to drop your display to 8-bit mode instead of 10.
Ah, you're right, I removed bitdepth,10
on my hyprland monitor config, and now it works like a charm. I didn't have great use of the 10 bits support anyway. Thanks a lot for your help !
Description:
When executing the
wl-screenrec
command, the following error is encountered:Steps to Reproduce:
Executing the
wl-screenrec
command results in the memory allocation error mentioned above.Environment:
Observations:
The error persists across both AUR packages (
wl-screenrec
andwl-screenrec-git
), and the use of the--no-hw
flag did not resolve the issue.