-
Notifications
You must be signed in to change notification settings - Fork 53
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
Quicksync issues on Alder Lake 12th generation CPU. #378
Comments
Hi @TheSashmo . I believe that vaapi and QSV are different. Here are our parameters for HEVC_QSV using a NUC12+. You might need to install libvpl stuff, depending on what OS you are running. Ubuntu plays the best.
|
Thanks for such quick response @alatteri. See I tried that, but qsv would always throw errors. What method are you using to install drivers? Could it be because I am trying to run this as headless and server mode instead of desktop ubuntu? Update. I made some progress, and it seems that I have to follow these instructions to make some progress: But even when I try: or ./UltraGrid-1.9.1-x86_64.AppImage -t decklink:0 -s embedded -c libavcodec:encoder=hevc_qsv:bitrate=15000k --audio-codec=opus:sample_rate=48000:bitrate=256k --audio-capture-format channels=16 -m 1316 -P 10000 127.0.0.1 --control-port 1234 I get similar errors for hevc and h264 respectively: [lavc h264_qsv @ 0x7f71a80f0500] Error during set display handle |
Make sure to use ubuntu 22.04 LTS with the latest HWE kernel. |
also make sure the user running UG is added to the video, audio and render groups. |
Let me add some more confusion to the mix..... I used to use this command -t decklink:0::UYVY and -c libavcodec:encoder=libx264:bitrate=15000k:subsampling=420 to set 8 bit 420. Now using the new error messages that I see in the console output I did this: -c libavcodec:encoder=libx264:bitrate=15000k:depth=8:subsampling=420 And I can get 1080p and 1080i at 60 without an issue, where as with the inital example I could not get progressive at 60 to be consistent. Have I been completely bleeping wrong this whole time?? Ideally I want to do 10bit 422 at P and I, but could live with 8 bit 420 as a back up solution not having to chase hardware encoding and decoding. |
HD 4:2:2 should be easily achievable with x264/x265 in software (CPU). There are less restrictions and it is better quality than hardware based encoders. |
1080p 10 bit 4:2:2 just can't encode and decode on the same machine at the same time. If I switch to 8 bit I can do 1080p 4:2:2 |
We tweak the OS (Ubuntu 22) to increase performance. sysctl
grub |
I'd strongly recommend deinterlacing the interlaced content before the HEVC compression (
I've just tried ADDENDUM (2024-05-22): I can confirm that QSV-encoded HEVC doesn't use WPP threads, so that it is not decoded in parallel by the default FFmpeg HEVC decoder. |
I've updated SW requirements for QSV. From the development point of view, I believe that there is nothing that can be done further for this issue if I am not mistaken. The decoding is unfortunately single-threaded, maybe just the content complexity can be reduced by the deinterlacing[1]. Let me know, if you think that something can be improved. [1] the deinterlacing can be also accelerated by QSV if needed (eg. here), but since it is the libavfilter, it is possible that the amount of development will be higher, so we won't perhaps do it for now. |
Print warning if decompress takes more than 66% of time per frame on average - as the decompress is now written (synchronously), the whole frame time is not available and the drops start earlier. refer to GH-378
So I have been playing around with ultra grid for a while, and I have never been able to get quicksync working correctly.
I decided to splurge and get a CPU that is newer, so now I have 12th Gen Intel(R) Core(TM) i7-1255U.
I've been testing on the latest release, and can confirm that I can get quicksync running correctly in interlaced only. I am able to get interlaced video working correctly and get proper encode and decode 150 Frames of video every 5 seconds in h.264
But when I try to use HEVC in interlaced mode, the encoding seems to work fine, but the decode is throwing tons of errors:
[lavc hevc @ 0x7fddf400fa00] CABAC_MAX_BIN : 7
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta 1094995529 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta 50 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta -31 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta -40 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta 39 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta -31 is outside the valid range [-26, 25].
Second issue is that I can not get h.264 or HEVC to encode at 300 frames every 5 seconds which would be the amount of frames needed for 59.94 progressive video encoding.
It seems like there is enough power to handle it, but it just cant get there.
My goal is to be able to encode and decode up to 1080p H264 and/or HEVC.
Here is the command for h.264:
./UltraGrid-1.9.1-x86_64.AppImage -t decklink:0 -s embedded -c libavcodec:encoder=h264_vaapi:bitrate=15000k --audio-codec=opus:sample_rate=48000:bitrate=256k --audio-capture-format channels=16 -m 1316 -P 10000 127.0.0.1 --control-port 1234
Here is the command for HEVC:
./UltraGrid-1.9.1-x86_64.AppImage -t decklink:0 -s embedded -c libavcodec:encoder=hevc_vaapi:bitrate=15000k --audio-codec=opus:sample_rate=48000:bitrate=256k --audio-capture-format channels=16 -m 1316 -P 10000 127.0.0.1 --control-port 1234
And in addtion to above, my hevc decode in either interlaced or progressive gives me this same output on the decode session:
[lavc hevc @ 0x7fddf400fa00] CABAC_MAX_BIN : 7
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta 1094995529 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta 50 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta -31 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta -40 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta 39 is outside the valid range [-26, 25].
[lavc hevc @ 0x7fddf400fa00] The cu_qp_delta -31 is outside the valid range [-26, 25].
The text was updated successfully, but these errors were encountered: