QSV not detected by Handbrake but working and detected in other apps

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
jpw
Posts: 2
Joined: Thu Nov 26, 2020 9:57 pm

QSV not detected by Handbrake but working and detected in other apps

Post by jpw »

Description of problem or question:

Hi, I'm trying to get Handbrake to use the J4115 QSV hardware for hardware transcoding on Ubuntu 18.04. I've tried Ubuntu 20.04 with the same results. I have QSV working to the extent that Plex is able to detect and use the QSV hardware. vainfo also reports the following:

error: can't connect to X server!
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Gemini Lake - 2.1.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD

I've tried building Handbrake from source, using prebuilt binaries, and using the Handbrake flatpak. All report

Code: Select all

Intel Quick Sync Video support: no
Steps to reproduce the problem (If Applicable):

This has been reproducible in all configurations that I've tried.


HandBrake version (e.g., 1.0.0):

1.3.3 (2020061500)


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

I've tried Ubuntu 18.04, Ubuntu 20.04. Both running within a VM. I'm also able to reproduce this behavior on the Proxmox host (and QSV works within Plex within the VM), and as a result I don't think that this is a VM issue.


HandBrake Activity Log ***required*** (see How-to get an activity log)

I terminated the transcode after a few seconds since it was clear that QSV wasn't enabled.

Code: Select all

Cannot load libnvidia-encode.so.1
[22:13:37] hb_init: starting libhb thread
[22:13:37] thread 7f6a7f4e5700 started ("libhb")
HandBrake 1.3.3 (2020061500) - Linux x86_64 - https://handbrake.fr
4 CPUs detected
Opening /media/Movies/xyz.mp4...
[22:13:37] CPU: Intel(R) Celeron(R) J4115 CPU @ 1.80GHz
[22:13:37]  - logical processor count: 4
[22:13:37] Intel Quick Sync Video support: no
[22:13:37] hb_scan: path=/media/Movies/xyz.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /media/Movies/xyz.mp4
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/media/Movies/xyz.mp4/) failed
[22:13:37] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[22:13:37] dvd: not a dvd - trying as a stream/file instead


Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: QSV not detected by Handbrake but working and detected in other apps

Post by Woodstock »

There's also a driver flatpak needed for QSV, as I recall, "QuickSync Plugin Download (64bit)" on the download page. Did you install that when the flatpak version?
jpw
Posts: 2
Joined: Thu Nov 26, 2020 9:57 pm

Re: QSV not detected by Handbrake but working and detected in other apps

Post by jpw »

Thanks for the quick response. I overlooked the QSV flatpak which definitely moved the needle and now I can see that QSV is enabled. Unfortunately, encoding fails with the following error:

Code: Select all

[01:55:59] qsv_enc_init: using 'hardware (2) via VAAPI' implementation, API: 1.32
Error code -21, hb_qsv_wait_on_sync     605
ERROR: encqsv: MFXVideoENCODE_EncodeFrameAsync failed (-21)
This doesn't seem to be a fully deterministic error though, as I also received the following on another run using the same media:

Code: Select all

[01:47:53] qsv_enc_init: using 'hardware (2) via VAAPI' implementation, API: 1.32
ERROR: QSV: not enough to have 10 surface(s) allocated
ERROR: encqsv: hb_qsv_get_free_surface failed
Is there any recommended debugging that I can do from here?
Post Reply