Open asksn0w opened 1 month ago
When HandbrakeCLI with av1 qsv preset then Segmentation fault
I think docker image has no intel arc driver.
Here is my full conversion log
/tmp # /usr/bin/HandBrakeCLI -i /watch/sample_1280x720_surfing_with_audio.mkv -o /output/test.mkv --preset-import-file /config/ghb/presets.json -Z AV1
--enable-qsv-decoding
[05:59:43] Compile-time hardening features are enabled
Cannot load libnvidia-encode.so.1
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[05:59:43] hb_display_init: attempting VA driver 'iHD'
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[05:59:43] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[05:59:43] qsv: is available on this system
[05:59:43] hb_init: starting libhb thread
[05:59:43] thread 15191ffc1b38 started ("libhb")
HandBrake 1.7.3 (2024030500) - Linux x86_64 - https://handbrake.fr
4 CPUs detected
Opening /watch/sample_1280x720_surfing_with_audio.mkv...
[05:59:43] CPU: Intel(R) Core(TM) i9-10900 CPU @ 2.80GHz
[05:59:43] - Intel microarchitecture Comet Lake
[05:59:43] - logical processor count: 4
[05:59:43] Intel Quick Sync Video support: yes
[05:59:43] Intel Quick Sync Video discrete adapter with index 0 and renderD128
[05:59:43] Impl mfx-gen library path: /usr/lib/libmfx-gen.so.1.2.9
[05:59:43] - Intel Media SDK hardware: API 2.9 (minimum: 1.3)
[05:59:43] - Decode support: h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[05:59:43] - H.264 encoder: yes
[05:59:43] - preferred implementation: hardware (any) via ANY
[05:59:43] - capabilities (hardware): lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[05:59:43] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[05:59:43] - preferred implementation: hardware (any) via ANY
[05:59:43] - capabilities (hardware): lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[05:59:43] - AV1 encoder: yes (8bit: yes, 10bit: yes)
[05:59:43] - preferred implementation: hardware (any) via ANY
[05:59:43] - capabilities (hardware): lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1 av1bitstream
[05:59:43] hb_scan: path=/watch/sample_1280x720_surfing_with_audio.mkv, title_index=1
Input #0, matroska,webm, from '/watch/sample_1280x720_surfing_with_audio.mkv':
Metadata:
COMPATIBLE_BRANDS: isomiso2avc1mp41
MAJOR_BRAND : mp42
MINOR_VERSION : 512
ENCODER : Lavf58.45.100
Duration: 00:03:03.13, start: 0.000000, bitrate: 3111 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
Metadata:
HANDLER_NAME : VideoHandler
ENCODER : Lavc58.91.100 libx264
DURATION : 00:03:03.061000000
Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
Metadata:
HANDLER_NAME : Stereo
ENCODER : Lavc58.91.100 libvorbis
DURATION : 00:03:03.129000000
[05:59:43] scan: decoding previews for title 1
[05:59:43] scan: audio 0x1: vorbis, rate=48000Hz, bitrate=1 English (Vorbis, 2.0 ch)
[05:59:43] using container PAR 1:1
[05:59:43] scan: 10 previews, 1280x720, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[05:59:43] scan: supported video decoders: avcodec qsv
[05:59:43] libhb: scan thread found 1 valid title(s)
+ Using preset: AV1
+ title 1:
+ stream: /watch/sample_1280x720_surfing_with_audio.mkv
+ duration: 00:03:03
+ size: 1280x720, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
+ autocrop: 0/0/0/0
+ chapters:
+ 1: duration 00:03:03
+ audio tracks:
+ 1, English (Vorbis, 2.0 ch) (iso639-2: eng)
+ subtitle tracks:
[05:59:43] Starting work at: Wed May 22 05:59:43 2024
[05:59:43] 1 job(s) to process
[05:59:43] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"CompressionLevel": -1.0,
"DRC": 0.0,
"DitherMethod": "auto",
"Encoder": "fdk_aac",
"Gain": 0.0,
"Mixdown": "stereo",
"NormalizeMixLevel": false,
"PresetEncoder": "fdk_aac",
"Quality": -3.0,
"Samplerate": 0,
"Track": 0
}
],
"CopyMask": [
"copy:aac"
],
"FallbackEncoder": "none"
},
"Destination": {
"AlignAVStart": false,
"ChapterList": [
{
"Duration": {
"Hours": 0,
"Minutes": 3,
"Seconds": 3,
"Ticks": 16481610
},
"Name": ""
}
],
"ChapterMarkers": false,
"File": "/output/test.mkv",
"InlineParameterSets": false,
"Mux": "mkv",
"Options": {
"IpodAtom": false,
"Optimize": false
}
},
"Filters": {
"FilterList": [
{
"ID": 10,
"Settings": {
"mode": 0
}
},
{
"ID": 19,
"Settings": {
"crop-bottom": 0,
"crop-left": 0,
"crop-right": 0,
"crop-top": 0,
"height": 720,
"width": 1280
}
}
]
},
"Metadata": {},
"PAR": {
"Den": 1,
"Num": 1
},
"SequenceID": 0,
"Source": {
"Angle": 0,
"HWDecode": 0,
"Path": "/watch/sample_1280x720_surfing_with_audio.mkv",
"Range": {
"End": 1,
"Start": 1,
"Type": "chapter"
},
"Title": 1
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"ChromaLocation": 1,
"ColorInputFormat": 0,
"ColorMatrix": 1,
"ColorOutputFormat": 0,
"ColorPrimaries": 1,
"ColorRange": 1,
"ColorTransfer": 1,
"Encoder": "qsv_av1",
"HardwareDecode": 0,
"Level": "auto",
"MultiPass": false,
"Options": "",
"Preset": "balanced",
"Profile": "auto",
"QSV": {
"AdapterIndex": 0,
"AsyncDepth": 0,
"Decode": true
},
"Quality": 24.0,
"Tune": "",
"Turbo": false
}
}
[05:59:43] qsv: discrete qsv adapter with index 0 has been selected
[05:59:43] Starting Task: Encoding Pass
[05:59:43] work: skipping crop/scale filter
[05:59:43] job configuration:
[05:59:43] * source
[05:59:43] + /watch/sample_1280x720_surfing_with_audio.mkv
[05:59:43] + title 1, chapter(s) 1 to 1
[05:59:43] + container: matroska,webm
[05:59:43] + data rate: 3111 kbps
[05:59:43] * destination
[05:59:43] + /output/test.mkv
[05:59:43] + container: Matroska (libavformat)
[05:59:43] * video track
[05:59:43] + decoder: h264_qsv 8-bit (yuv420p)
[05:59:43] + filters
[05:59:43] + Framerate Shaper (mode=0)
[05:59:43] + frame rate: same as source (around 23.976 fps)
[05:59:43] + Format (format=nv12)
[05:59:43] + Output geometry
[05:59:43] + storage dimensions: 1280 x 720
[05:59:43] + pixel aspect ratio: 1 : 1
[05:59:43] + display dimensions: 1280 x 720
[05:59:43] + encoder: AV1 (Intel Media SDK)
[05:59:43] + preset: balanced
[05:59:43] + profile: auto
[05:59:43] + level: auto
[05:59:43] + quality: 24.00 (ICQ)
[05:59:43] + color profile: 1-1-1
[05:59:43] + chroma location: left
[05:59:43] * audio track 1
[05:59:43] + decoder: English (Vorbis, 2.0 ch) (track 1, id 0x1)
[05:59:43] + samplerate: 48000 Hz
[05:59:43] + mixdown: Stereo
[05:59:43] + encoder: AAC (libfdk_aac)
[05:59:43] + bitrate: 160 kbps, samplerate: 48000 Hz
[05:59:43] sync: expecting 4390 video frames
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[05:59:43] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[05:59:43] encqsvInit: using encode-only via system memory (LowPower) path
[05:59:43] encqsvInit: AV1 Main profile @ level 3.1
[05:59:43] encqsvInit: TargetUsage 4 AsyncDepth 6
[05:59:43] encqsvInit: GopRefDist 8 GopPicSize 48 NumRefFrame 4 IdrInterval 0
[05:59:43] encqsvInit: BFramesMax 7 BRefType pyramid
[05:59:43] encqsvInit: RateControlMethod ICQ ICQQuality 24
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
Segmentation fault
Current Behavior
When Using automate av1 qsv make 0kb file. even default preset name as 'AV1 QSV 2160p60 4K'.
Expected Behavior
return nomal encorded file.
Steps To Reproduce
Environment
OS: TrueNAS SCALE
OS version: 24.04.0
CPU: x86-64
Docker version: -
Device model: CPU : Intel(R) Core(TM) i9-10900 RAM : 32GB Watch Folder : local disk Output Folder : nfs shared
Docker env: INSTALL_PACKAGES=intel-media-driver mesa-va-gallium mesa-dri-gallium AUTOMATED_CONVERSION_INSTALL_PKGS=intel-media-driver mesa-va-gallium mesa-dri-gallium
Container creation
Container log
Container inspect
No response
Anything else?
The Truenas make log