Intel QSV issues

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
jkkozak
Posts: 1
Joined: Sun Aug 07, 2022 7:11 pm

Intel QSV issues

Post by jkkozak »

Description of problem or question:
I've been struggling to get Intel QSV encoding working. I first installed Handbrake from the terminal and found that Intel QSV options did not appear in the encoder list on the video tab. The downloads page has a specific package for this via flathub. So I uninstalled handbrake, reinstalled from flathub and installed the QuickSync plugin as well. Now Intel QSV shows up in the encoder list, but encoding fails after the subtitle scan. The logs show two errors. The first appears to relate to looking at the media itself, "ECMA error 167 Volume Recognition failed." The second, and I might not be reading this right, looks like a problem initializing QSV encoder driver.

Any thoughts? Thanks!

Steps to reproduce the problem (If Applicable):
n/a



HandBrake version (e.g., 1.0.0):
15.1



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



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

Code: Select all

Handbrake Version: 1.5.1 (2022011000)
[14:53:15] gtkgui: Modified Preset: /Matroska/H.265 MKV 2160p60
[14:53:15] Starting work at: Sun Aug  7 14:53:15 2022

[14:53:15] 1 job(s) to process
[14:53:15] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "copy:truehd",
                "Gain": 0.0,
                "Mixdown": "none",
                "Name": "Surround 7.1",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 8,
                    "Seconds": 19,
                    "Ticks": 44872327
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 53,
                    "Ticks": 37143356
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 10,
                    "Seconds": 11,
                    "Ticks": 54999945
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 35,
                    "Ticks": 35570535
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 3,
                    "Ticks": 38036749
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 11,
                    "Seconds": 7,
                    "Ticks": 60056246
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 11,
                    "Seconds": 21,
                    "Ticks": 61313753
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 23,
                    "Ticks": 39842302
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 49,
                    "Ticks": 42207165
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 49,
                    "Ticks": 42199658
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 9,
                    "Seconds": 31,
                    "Ticks": 51388837
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 9,
                    "Seconds": 1,
                    "Ticks": 48674877
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 9,
                    "Seconds": 53,
                    "Ticks": 53340787
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 51,
                    "Ticks": 42349807
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 10,
                    "Seconds": 59,
                    "Ticks": 59279146
                },
                "Name": "Chapter 15"
            }
        ],
        "ChapterMarkers": true,
        "File": "/mnt/148e735e-0cf6-4f3c-8448-ae8019850191/Shazam! (2019).mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 3,
                "Settings": {
                    "block-height": "16",
                    "block-thresh": "40",
                    "block-width": "16",
                    "filter-mode": "2",
                    "mode": "3",
                    "motion-thresh": "1",
                    "spatial-metric": "2",
                    "spatial-thresh": "1"
                }
            },
            {
                "ID": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 276,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 276,
                    "height": 1608,
                    "width": 3840
                }
            }
        ]
    },
    "Metadata": {
        "Name": "Shazam!"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv",
        "Range": {
            "End": 15,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": true,
            "Forced": true
        },
        "SubtitleList": [
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Offset": 0,
                "Track": 0
            }
        ]
    },
    "Video": {
        "ChromaLocation": 3,
        "ColorInputFormat": 0,
        "ColorMatrix": 9,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 9,
        "ColorRange": 1,
        "ColorTransfer": 16,
        "ContentLightLevel": {
            "MaxCLL": 1351,
            "MaxFALL": 384
        },
        "Encoder": "qsv_h265_10bit",
        "Level": "auto",
        "Mastering": {
            "DisplayPrimaries": [
                [
                    [
                        34000,
                        50000
                    ],
                    [
                        16000,
                        50000
                    ]
                ],
                [
                    [
                        13250,
                        50000
                    ],
                    [
                        34500,
                        50000
                    ]
                ],
                [
                    [
                        7500,
                        50000
                    ],
                    [
                        3000,
                        50000
                    ]
                ]
            ],
            "HasLuminance": true,
            "HasPrimaries": true,
            "MaxLuminance": [
                40000000,
                10000
            ],
            "MinLuminance": [
                50,
                10000
            ],
            "WhitePoint": [
                [
                    15635,
                    50000
                ],
                [
                    16450,
                    50000
                ]
            ]
        },
        "Options": "",
        "Preset": "balanced",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 16.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[14:53:15] CPU: 12th Gen Intel(R) Core(TM) i7-12700K
[14:53:15]  - logical processor count: 20
[14:53:15] Intel Quick Sync Video support: yes
[14:53:15]  - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[14:53:15]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[14:53:15]  - H.264 encoder: yes
[14:53:15]     - preferred implementation: hardware (any) via ANY
[14:53:15]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[14:53:15]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[14:53:15]     - preferred implementation: hardware (any) via ANY
[14:53:15]     - capabilities (hardware):  lowpower bpyramid icq vsinfo opt1
[14:53:15] hb_scan: path=/mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image /mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(/mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv/) failed
[14:53:15] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[14:53:15] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv':
  Metadata:
    title           : Shazam!
    encoder         : libmakemkv v1.17.1 (1.3.10/1.5.2) x86_64-linux-gnu
    creation_time   : 2022-08-07T14:14:09.000000Z
  Duration: 02:11:43.06, start: 0.000000, bitrate: 80497 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 498.581417
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 498.581417, end 911.285375
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 911.285375, end 1522.395875
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1522.395875, end 1917.624042
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1917.624042, end 2340.254583
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2340.254583, end 3007.546208
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 3007.546208, end 3688.810125
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 3688.810125, end 4131.502375
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 4131.502375, end 4600.470875
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 4600.470875, end 5069.355958
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 5069.355958, end 5640.343042
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 5640.343042, end 6181.175000
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 6181.175000, end 6773.850417
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 6773.850417, end 7244.403833
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 7244.403833, end 7903.061833
      Metadata:
        title           : Chapter 15
  Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc
    Metadata:
      BPS-eng         : 76801842
      DURATION-eng    : 02:11:43.061833333
      NUMBER_OF_FRAMES-eng: 189484
      NUMBER_OF_BYTES-eng: 75871205596
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-08-07 14:14:09
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      title           : Surround 7.1
      BPS-eng         : 3645494
      DURATION-eng    : 02:11:43.061666666
      NUMBER_OF_FRAMES-eng: 9483674
      NUMBER_OF_BYTES-eng: 3601320608
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-08-07 14:14:09
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 37543
      DURATION-eng    : 02:11:32.321937500
      NUMBER_OF_FRAMES-eng: 4310
      NUMBER_OF_BYTES-eng: 37038180
      SOURCE_ID-eng   : 0012A0
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-08-07 14:14:09
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[14:53:15] scan: decoding previews for title 1
[14:53:15] scan: audio 0x1: truehd, rate=48000Hz, bitrate=1 English (TrueHD) (7.1 ch)
[14:53:19] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 276/276/0/0, aspect 16:9, PAR 1:1, color profile: 9-16-9, chroma location: topleft
[14:53:19] scan: mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
[14:53:19] scan: content light level: max_cll=1351, max_fall=384
[14:53:19] scan: supported video decoders: avcodec qsv
[14:53:19] libhb: scan thread found 1 valid title(s)
[14:53:19] Starting Task: Subtitle Scan
[14:53:19] Skipping vfr filter
[14:53:19] job configuration:
[14:53:19]  * source
[14:53:19]    + /mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv
[14:53:19]    + title 1, chapter(s) 1 to 15
[14:53:19]    + container: matroska,webm
[14:53:19]    + data rate: 80497 kbps
[14:53:19]  * destination
[14:53:19]    + /mnt/148e735e-0cf6-4f3c-8448-ae8019850191/Shazam! (2019).mkv
[14:53:19]    + container: Matroska (libavformat)
[14:53:19]      + chapter markers
[14:53:19]  * video track
[14:53:19]    + decoder: hevc 8-bit (yuv420p)
[14:53:19]    + filters
[14:53:19]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[14:53:19]      + Decomb (mode=39)
[14:53:19]      + Crop and Scale (width=3840:height=1608:crop-top=276:crop-bottom=276:crop-left=0:crop-right=0)
[14:53:19]        + source: 3840 * 2160, crop (276/276/0/0): 3840 * 1608, scale: 3840 * 1608
[14:53:19]    + Output geometry
[14:53:19]      + storage dimensions: 3840 x 1608
[14:53:19]      + pixel aspect ratio: 1 : 1
[14:53:19]      + display dimensions: 3840 x 1608
[14:53:19]  * Foreign Audio Search: Render/Burn-in, Forced Only
[14:53:19]    + subtitle, English [PGS] (track 0, id 0x2, Picture)
[14:53:19] sync: expecting 189483 video frames
[14:56:06] reader: done. 1 scr changes
[14:56:06] work: average encoding speed for job is 0.000000 fps
[14:56:06] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[14:56:06] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[14:56:06] hevc-decoder done: 0 frames, 0 decoder errors
[14:56:06] sync: got 0 frames, 189483 expected
[14:56:06] Subtitle track 0 (id 0x2) 'English [PGS]': 2155 hits (0 forced)
[14:56:06] No candidate detected during subtitle scan
[14:56:06] Starting Task: Encoding Pass
[14:56:06] Skipping vfr filter
[14:56:06] job configuration:
[14:56:06]  * source
[14:56:06]    + /mnt/2f7859c7-9a74-4e01-8a27-abf093d98b0b/Shazam!_t00.mkv
[14:56:06]    + title 1, chapter(s) 1 to 15
[14:56:06]    + container: matroska,webm
[14:56:06]    + data rate: 80497 kbps
[14:56:06]  * destination
[14:56:06]    + /mnt/148e735e-0cf6-4f3c-8448-ae8019850191/Shazam! (2019).mkv
[14:56:06]    + container: Matroska (libavformat)
[14:56:06]      + chapter markers
[14:56:06]  * video track
[14:56:06]    + decoder: hevc 8-bit (yuv420p)
[14:56:06]    + filters
[14:56:06]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[14:56:06]      + Decomb (mode=39)
[14:56:06]      + Crop and Scale (width=3840:height=1608:crop-top=276:crop-bottom=276:crop-left=0:crop-right=0)
[14:56:06]        + source: 3840 * 2160, crop (276/276/0/0): 3840 * 1608, scale: 3840 * 1608
[14:56:06]    + Output geometry
[14:56:06]      + storage dimensions: 3840 x 1608
[14:56:06]      + pixel aspect ratio: 1 : 1
[14:56:06]      + display dimensions: 3840 x 1608
[14:56:06]    + encoder: H.265 10-bit (Intel Media SDK)
[14:56:06]      + preset:  balanced
[14:56:06]      + profile: auto
[14:56:06]      + level:   auto
[14:56:06]      + quality: 16.00 (ICQ)
[14:56:06]      + color profile: 9-16-9
[14:56:06]      + chroma location: topleft
[14:56:06]      + mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
[14:56:06]      + content light level: max_cll=1351, max_fall=384
[14:56:06]  * subtitle track 1, English [PGS] (track 0, id 0x2, Picture) -> Passthrough
[14:56:06]  * audio track 1
[14:56:06]    + name: Surround 7.1
[14:56:06]    + decoder: English (TrueHD) (7.1 ch) (track 1, id 0x1)
[14:56:06]      + samplerate: 48000 Hz
[14:56:06]    + TrueHD Passthru
[14:56:06] sync: expecting 189483 video frames
[14:56:06] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.13.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /app/extensions/IntelMediaSDK/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
[14:56:06] encqsvInit: MFXVideoENCODE_Init failed (-15)
[14:56:06] encqsvInit: using encode-only (LowPower) path
[14:56:06] encqsvInit: H.265/HEVC Main 10 profile @ level (null)
[14:56:06] encqsvInit: TargetUsage 4 AsyncDepth 6
[14:56:06] encqsvInit: GopRefDist 3 GopPicSize 24 NumRefFrame 1
[14:56:06] encqsvInit: BFramesMax 2 BRefType off
[14:56:06] encqsvInit: RateControlMethod ICQ ICQQuality 16
[14:56:06] Failure to initialise thread 'Quick Sync Video encoder (Intel Media SDK)'
[14:56:06] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[14:56:06] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[14:56:06] truehd-decoder done: 0 frames, 0 decoder errors
[14:56:06] hevc-decoder done: 0 frames, 0 decoder errors
[14:56:06] sync: got 0 frames, 189483 expected
[14:56:06] Finished work at: Sun Aug  7 14:56:06 2022

[14:56:06] libhb: work result = 3
Deleted User 11865

Re: Intel QSV issues

Post by Deleted User 11865 »

Try disabling QSV low-power mode (should be somewhere in preferences).
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: Intel QSV issues

Post by s55 »

There are no qsv preferences on Linux Rodeo. I don't think you can add extra args on Linux Either. We never added formal support for the QSV encoder to the Linux UI.

12th gen based systems will often need a BIOS update to operate correctly with HandBrake as well.
Deleted User 11865

Re: Intel QSV issues

Post by Deleted User 11865 »

s55 wrote: Sun Aug 07, 2022 8:42 pmI don't think you can add extra args on Linux Either.
Should be possible via the CLI at least.
Post Reply