-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No usable encoding profile found. #41
Comments
I do not think the '--no-hw' path is especially attractive solution anyway, but the error message was more informative to why 'No usable encoding profile found' was returned in the default setup. |
Retrospectively --no-hw isn't a great name for the flag, as it still does the pixel format conversion in HW. Does wf-recorder with vaapi work for you? Hard to imagine it does considering vainfo doesn't show any h264 support..... |
I find it likely that the reason why it works on my other Fedora box is that it uses an Intel GPU and here on the workstation I have a fancy AMD GPU. The error message "failed to create encoder: Function not implemented" is perhaps not the best, but besides that I do not think there is much you can help me with here. "Fedora 37 drops VA-API accelerated hardware video decoding support" https://www.reddit.com/r/linux/comments/xpyggi/comment/iq6nkhn/ |
Hmm, this is encode and that is decode. Other people have reported this working fine on AMD GPUs, but I don't have one to test. Unfortunately that error is from ffmpeg. |
The situation seems to be improving on my side. I got a lot of things in order on the new system. So, I wanted of course to go back and revisit this. This issue was the reason why I changed from Fedora to Arch Linux (Artix flavor) to begin with. :-)
The error message looks strange because radeontop tells me there is plenty of memory. |
Just to be safe, can you show the output of
(not sure if this has been merged into upstream ffmpeg, but the "Cannot allocate memory" message might be bogus as per https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/) |
It only shows vdpau ... ? Just to be clear, I have an [AMD/ATI] Vega 20 [Radeon VII] (rev c1) GPU. I have disabled the Intel integrated GPU such that the OS only sees the PEG device. vainfo seems to work fine and also wf-recorder seems to be using the GPU (both CPU and GPU utilization is low during recording.) |
@hholst80 That is weird, its as if your ffmpeg build does not have vaapi enabled for some reason. Can you check the output of For me it shows both |
Classic "well, this is embarrassing" situation.
Fixing that I get:
|
Could wl-screenrec be using the wrong ffmpeg? |
Looks like ffmpeg and wl-screenrec are using the same libs. diff: test-vaapi.mp4 |
Perhaps this is just due to a more permissive error handling in wf-recorder vs. wl-screenrec?
|
I don't think so. You're welcome to test this patch against latest diff --git a/src/main.rs b/src/main.rs
index fd62896..a2790ad 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1423,7 +1423,9 @@ impl EncState {
.is_ok()
{
// encoder has same time base as the filter, so don't do any time scaling
- self.enc_video.send_frame(&yuv_frame).unwrap();
+ if let Err(e) = self.enc_video.send_frame(&yuv_frame) {
+ eprintln!("Failed to encode: {e}")
+ }
}
let mut encoded = Packet::empty(); I'll probably push this patch anyways as it's less nasty than a panic, and I suppose maybe sometimes that error isn't fatal. It's hard to say. I would be interested in full |
on git sha 6110ba6 I get this. Seems to be the same error message as I got on the "new machine" (called "goblin") in #64 This is on the same hardware as before on my "neo" machine.
|
Aha! If I use an integer scaling, like 2 instead of 2.4 like I am using now on both neo and goblin, I get this more familiar error message:
Another codec will work, it records a video, but with some yellow warnings: |
Does ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -f lavfi -i testsrc=duration=10:size=1280x720 -filter_complex 'hwupload,scale_vaapi=format=nv12' -c:v h264_vaapi -loglevel 80 test.mp4 work and create a valid video? |
i've recorded videos with this program before, but i started having this exact issue some time ago and i'm not sure what caused it.
vainfo shows the amd card should work and ffmpeg with vaapi encoding works fine |
Not sure what is going on here. wl-record says vaapi does not support yuv420 but vainfo says it does?
wl-record v0.1.1 compiled via cargo + git.
The text was updated successfully, but these errors were encountered: