Skip to content
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

Can't get -hwaccel qsv command to work. #322

Open
SKAntoniou opened this issue May 20, 2024 · 16 comments
Open

Can't get -hwaccel qsv command to work. #322

SKAntoniou opened this issue May 20, 2024 · 16 comments

Comments

@SKAntoniou
Copy link

SKAntoniou commented May 20, 2024

Hey, so I am trying to use ffmpeg with QSV on 24.04 Ubuntu LTS, 6.8 Kernel. I am going to run through all the errors and cases I encountered. Most of this is just a ffmpeg log, but I thought it would be best to include it all in case I missed anything. Let me know if you need anything.

The ffmpeg commands that work:

ffmpeg -init_hw_device vaapi=va:/dev/dri/renderD128

This will work without issue. I just want to see if the QSV method will increase performance.

The ffmpeg command that doesn't work:

ffmpeg -hwaccel qsv -qsv_device ${DEVICE:-/dev/dri/renderD128}

I want to test if this increases performance, but I can't get this to work. This is what is referenced in the Intel Media Delivery optimisation documentation.

Standard Media Driver Package packages installed:

sudo apt install ffmpeg libva2 vainfo libvpl2 libmfx-gen1.2 libmfx1 libigdgmm12 intel-media-va-driver 

These errors are the same if intel-media-va-driver-non-free is installed instead.

Command ran - Most basic of command - If I add just -b:v, it remains the same issue:

sudo ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 \
  -i jackryan4k.mkv \
  -c:v av1_qsv \
  jackryan4k2.mkv

Result:

sudo ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 \
  -i jackryan4k.mkv \
  -c:v av1_qsv \
  jackryan4k2.mkv
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
  configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/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/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x5d282af070c0] Could not find codec parameters for stream 12 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[vist#0:0/hevc @ 0x5d282af85b00] WARNING: defaulting hwaccel_output_format to qsv for compatibility with old commandlines. This behaviour is DEPRECATED and will be removed in the future. Please explicitly set "-hwaccel_output_format qsv".
Input #0, matroska,webm, from 'jackryan4k.mkv':
  Metadata:
    title           : Tom.Clancy's.Jack.Ryan.S02E04.Dressed.to.Kill.2160p.UHD.Blu-ray.Remux.HEVC.TrueHD.7.1.Atmos-SiCFoI
    encoder         : libebml v1.4.0 + libmatroska v1.6.2
    creation_time   : 2022-12-14T03:02:03.000000Z
  Duration: 00:42:41.73, start: 0.000000, bitrate: 49204 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 92.300533
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 92.300533, end 675.341333
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 675.341333, end 1251.750489
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1251.750489, end 1802.926111
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1802.926111, end 2098.429667
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2098.429667, end 2439.520400
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 2439.520400, end 2561.733000
      Metadata:
        title           : Chapter 07
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      title           : Tom.Clancy's.Jack.Ryan.S02E04.Dressed.to.Kill.2160p.UHD.Blu-ray.Remux.HEVC.TrueHD.7.1.Atmos-SiCFoI
      BPS-eng         : 44957450
      DURATION-eng    : 00:42:41.726000000
      NUMBER_OF_FRAMES-eng: 61420
      NUMBER_OF_BYTES-eng: 14396083799
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: truehd (Dolby TrueHD + Dolby Atmos), 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      title           : TrueHD 7.1 Atmos
      BPS-eng         : 3477282
      DURATION-eng    : 00:42:41.727000000
      NUMBER_OF_FRAMES-eng: 3074072
      NUMBER_OF_BYTES-eng: 1113481030
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
      title           : AC-3-EX 5.1
      BPS-eng         : 640000
      DURATION-eng    : 00:42:41.728000000
      NUMBER_OF_FRAMES-eng: 80054
      NUMBER_OF_BYTES-eng: 204938240
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle (default)
    Metadata:
      title           : English
      BPS-eng         : 27556
      DURATION-eng    : 00:37:14.107000000
      NUMBER_OF_FRAMES-eng: 706
      NUMBER_OF_BYTES-eng: 7695517
      SOURCE_ID-eng   : 0012a0
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      title           : English (SDH)
      BPS-eng         : 28244
      DURATION-eng    : 00:40:40.813000000
      NUMBER_OF_FRAMES-eng: 786
      NUMBER_OF_BYTES-eng: 8617430
      SOURCE_ID-eng   : 0012a1
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(dan): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Danish
      BPS-eng         : 18425
      DURATION-eng    : 00:41:06.673000000
      NUMBER_OF_FRAMES-eng: 944
      NUMBER_OF_BYTES-eng: 5681346
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6(dut): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Dutch
      BPS-eng         : 17985
      DURATION-eng    : 00:41:06.631000000
      NUMBER_OF_FRAMES-eng: 938
      NUMBER_OF_BYTES-eng: 5545516
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:7(fin): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Finnish
      BPS-eng         : 17620
      DURATION-eng    : 00:41:19.811000000
      NUMBER_OF_FRAMES-eng: 950
      NUMBER_OF_BYTES-eng: 5461796
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:8(fre): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : French
      BPS-eng         : 17694
      DURATION-eng    : 00:41:19.852000000
      NUMBER_OF_FRAMES-eng: 942
      NUMBER_OF_BYTES-eng: 5484880
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:9(ger): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : German
      BPS-eng         : 19112
      DURATION-eng    : 00:41:06.673000000
      NUMBER_OF_FRAMES-eng: 858
      NUMBER_OF_BYTES-eng: 5893188
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:10(nor): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Norwegian
      BPS-eng         : 18595
      DURATION-eng    : 00:40:45.568000000
      NUMBER_OF_FRAMES-eng: 948
      NUMBER_OF_BYTES-eng: 5684545
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:11(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Spanish
      BPS-eng         : 15031
      DURATION-eng    : 00:41:19.769000000
      NUMBER_OF_FRAMES-eng: 708
      NUMBER_OF_BYTES-eng: 4659430
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:12(swe): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Swedish
      BPS-eng         : 18504
      DURATION-eng    : 00:41:06.673000000
      NUMBER_OF_FRAMES-eng: 944
      NUMBER_OF_BYTES-eng: 5705539
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> av1 (av1_qsv))
  Stream #0:1 -> #0:1 (truehd (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
Output #0, matroska, to 'jackryan4k2.mkv':
  Metadata:
    title           : Tom.Clancy's.Jack.Ryan.S02E04.Dressed.to.Kill.2160p.UHD.Blu-ray.Remux.HEVC.TrueHD.7.1.Atmos-SiCFoI
    encoder         : Lavf60.16.100
  Chapters:
    Chapter #0:0: start 0.000000, end 92.300533
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 92.300533, end 675.341333
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 675.341333, end 1251.750489
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1251.750489, end 1802.926111
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1802.926111, end 2098.429667
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2098.429667, end 2439.520400
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 2439.520400, end 2561.733000
      Metadata:
        title           : Chapter 07
  Stream #0:0: Video: av1 (AV01 / 0x31305641), qsv(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 23.98 fps, 1k tbn (default)
    Metadata:
      title           : Tom.Clancy's.Jack.Ryan.S02E04.Dressed.to.Kill.2160p.UHD.Blu-ray.Remux.HEVC.TrueHD.7.1.Atmos-SiCFoI
      BPS-eng         : 44957450
      DURATION-eng    : 00:42:41.726000000
      NUMBER_OF_FRAMES-eng: 61420
      NUMBER_OF_BYTES-eng: 14396083799
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      encoder         : Lavc60.31.102 av1_qsv
  Stream #0:1(eng): Audio: vorbis (oV[0][0] / 0x566F), 48000 Hz, 7.1, fltp (default)
    Metadata:
      title           : TrueHD 7.1 Atmos
      BPS-eng         : 3477282
      DURATION-eng    : 00:42:41.727000000
      NUMBER_OF_FRAMES-eng: 3074072
      NUMBER_OF_BYTES-eng: 1113481030
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc60.31.102 libvorbis
EHW Exception: vector::_M_range_check: __n (which is 255) >= this->size() (which is 4)=2.28x
[av1_qsv @ 0x5d282aed1940] Invalid FrameType:0.
[vost#0:0/av1_qsv @ 0x5d282aed1580] Error submitting video frame to the encoder
Error while filtering: Invalid data found when processing input
[hevc_qsv @ 0x5d282afc4000] A decode call did not consume any data: expect more data at input (-10)
    Last message repeated 2 times

This then stalls, and nothing happens.

^C^C^CReceived > 3 system signals, hard exiting

If I do what it says midway through:

[vist#0:0/hevc @ 0x5d282af85b00] WARNING: defaulting hwaccel_output_format to qsv for compatibility with old commandlines. This behaviour is DEPRECATED and will be removed in the future. Please explicitly set "-hwaccel_output_format qsv".

Same errors at the end.

This next part worked on 22.04 HWE with ffmpeg 6.1 package installed (with vaapi option used instead of qsv). This breaks on 24.04 for some reason and gives this error so this may be a 24.04 error.
Command Used - If I try to replicate https://github.com/intel/media-delivery/blob/master/doc/quality.rst#av1 commands then it breaks earlier.

sudo ffmpeg -hwaccel qsv -qsv_device ${DEVICE:-/dev/dri/renderD128} -extra_hw_frames 40 -an \
  -i /ssdnfs/jackryan4k.mkv \
  -c:v av1_qsv -preset veryslow -profile:v main -async_depth 1 \
  -b:v 1M -maxrate 2M -bufsize 4M \
  -rc_init_occupancy 2M -look_ahead_depth 40 -extbrc 1 \
  -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -bf 7 -g 256 -strict -1 \
  -fps_mode passthrough -y jackryan4k2.mkv

Results:

sudo ffmpeg -hwaccel qsv -qsv_device ${DEVICE:-/dev/dri/renderD128} -extra_hw_frames 40 -an \
  -i /ssdnfs/jackryan4k.mkv \
  -c:v av1_qsv -preset veryslow -profile:v main -async_depth 1 \
  -b:v 1M -maxrate 2M -bufsize 4M \
  -rc_init_occupancy 2M -look_ahead_depth 40 -extbrc 1 \
  -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -bf 7 -g 256 -strict -1 \
  -fps_mode passthrough -y jackryan4k2.mkv
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
  configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/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/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0x57a848591400] Could not find codec parameters for stream 12 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[vist#0:0/hevc @ 0x57a848610040] WARNING: defaulting hwaccel_output_format to qsv for compatibility with old commandlines. This behaviour is DEPRECATED and will be removed in the future. Please explicitly set "-hwaccel_output_format qsv".
Input #0, matroska,webm, from '/ssdnfs/jackryan4k.mkv':
  Metadata:
    title           : Tom.Clancy's.Jack.Ryan.S02E04.Dressed.to.Kill.2160p.UHD.Blu-ray.Remux.HEVC.TrueHD.7.1.Atmos-SiCFoI
    encoder         : libebml v1.4.0 + libmatroska v1.6.2
    creation_time   : 2022-12-14T03:02:03.000000Z
  Duration: 00:42:41.73, start: 0.000000, bitrate: 49204 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 92.300533
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 92.300533, end 675.341333
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 675.341333, end 1251.750489
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1251.750489, end 1802.926111
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1802.926111, end 2098.429667
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2098.429667, end 2439.520400
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 2439.520400, end 2561.733000
      Metadata:
        title           : Chapter 07
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      title           : Tom.Clancy's.Jack.Ryan.S02E04.Dressed.to.Kill.2160p.UHD.Blu-ray.Remux.HEVC.TrueHD.7.1.Atmos-SiCFoI
      BPS-eng         : 44957450
      DURATION-eng    : 00:42:41.726000000
      NUMBER_OF_FRAMES-eng: 61420
      NUMBER_OF_BYTES-eng: 14396083799
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: truehd (Dolby TrueHD + Dolby Atmos), 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      title           : TrueHD 7.1 Atmos
      BPS-eng         : 3477282
      DURATION-eng    : 00:42:41.727000000
      NUMBER_OF_FRAMES-eng: 3074072
      NUMBER_OF_BYTES-eng: 1113481030
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
      title           : AC-3-EX 5.1
      BPS-eng         : 640000
      DURATION-eng    : 00:42:41.728000000
      NUMBER_OF_FRAMES-eng: 80054
      NUMBER_OF_BYTES-eng: 204938240
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle (default)
    Metadata:
      title           : English
      BPS-eng         : 27556
      DURATION-eng    : 00:37:14.107000000
      NUMBER_OF_FRAMES-eng: 706
      NUMBER_OF_BYTES-eng: 7695517
      SOURCE_ID-eng   : 0012a0
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      title           : English (SDH)
      BPS-eng         : 28244
      DURATION-eng    : 00:40:40.813000000
      NUMBER_OF_FRAMES-eng: 786
      NUMBER_OF_BYTES-eng: 8617430
      SOURCE_ID-eng   : 0012a1
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(dan): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Danish
      BPS-eng         : 18425
      DURATION-eng    : 00:41:06.673000000
      NUMBER_OF_FRAMES-eng: 944
      NUMBER_OF_BYTES-eng: 5681346
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6(dut): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Dutch
      BPS-eng         : 17985
      DURATION-eng    : 00:41:06.631000000
      NUMBER_OF_FRAMES-eng: 938
      NUMBER_OF_BYTES-eng: 5545516
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:7(fin): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Finnish
      BPS-eng         : 17620
      DURATION-eng    : 00:41:19.811000000
      NUMBER_OF_FRAMES-eng: 950
      NUMBER_OF_BYTES-eng: 5461796
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:8(fre): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : French
      BPS-eng         : 17694
      DURATION-eng    : 00:41:19.852000000
      NUMBER_OF_FRAMES-eng: 942
      NUMBER_OF_BYTES-eng: 5484880
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:9(ger): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : German
      BPS-eng         : 19112
      DURATION-eng    : 00:41:06.673000000
      NUMBER_OF_FRAMES-eng: 858
      NUMBER_OF_BYTES-eng: 5893188
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:10(nor): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Norwegian
      BPS-eng         : 18595
      DURATION-eng    : 00:40:45.568000000
      NUMBER_OF_FRAMES-eng: 948
      NUMBER_OF_BYTES-eng: 5684545
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:11(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Spanish
      BPS-eng         : 15031
      DURATION-eng    : 00:41:19.769000000
      NUMBER_OF_FRAMES-eng: 708
      NUMBER_OF_BYTES-eng: 4659430
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:12(swe): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : Swedish
      BPS-eng         : 18504
      DURATION-eng    : 00:41:06.673000000
      NUMBER_OF_FRAMES-eng: 944
      NUMBER_OF_BYTES-eng: 5705539
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-14 03:02:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> av1 (av1_qsv))
Press [q] to stop, [?] for help
[av1_qsv @ 0x57a8485e3540] Error initializing the encoder: invalid video parameters (-15)
[vost#0:0/av1_qsv @ 0x57a8485e3180] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Invalid argument
[hevc_qsv @ 0x57a84858e780] A decode call did not consume any data: expect more data at input (-10)
    Last message repeated 2 times
[out#0/matroska @ 0x57a848591080] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=N/A bitrate=N/A speed=N/A
Conversion failed!
@SKAntoniou
Copy link
Author

SKAntoniou commented May 20, 2024

Will note from intel's drivers documentation. On 22.04 I installed these parts:

wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
  sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" | \
  sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list
  
sudo apt update && sudo apt upgrade

sudo apt install -y \
  intel-platform-vsec-dkms \
  intel-platform-cse-dkms intel-fw-gpu
  
sudo apt install intel-i915-dkms 

I have not had any luck installing this on 24.04. Also clinfo does not work. Would normally work like:

sudo apt install clinfo
clinfo | grep "Device Name"
Output = 
  Device Name                                     Intel(R) Arc(TM) A380 Graphics
    Device Name                                   Intel(R) Arc(TM) A380 Graphics
    Device Name                                   Intel(R) Arc(TM) A380 Graphics
    Device Name                                   Intel(R) Arc(TM) A380 Graphics

On 24.04, it does not output anything.

@feiwan1
Copy link
Contributor

feiwan1 commented May 20, 2024

Hi @SKAntoniou , could you have a quick check by using kernel 6.9 https://kernel.ubuntu.com/mainline/v6.9/? This maybe a kernel issue:
jellyfin/jellyfin#11626

@SKAntoniou
Copy link
Author

Updated to kernel 6.9.1, very slightly better results.

So Command one doesn't stall. It has more error messages, but better than stalling.

sudo ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 \
  -i jackryan4k.mkv \
  -c:v av1_qsv \
  jackryan4k2.mkv

Result now shortened:

EHW Exception: vector::_M_range_check: __n (which is 255) >= this->size() (which is 4)
[av1_qsv @ 0x5e55fb158840] Invalid FrameType:0.
[vost#0:0/av1_qsv @ 0x5e55fb09bc80] Error submitting video frame to the encoder
[vost#0:0/av1_qsv @ 0x5e55fb09bc80] Error encoding a frame: Invalid data found when processing input
[vost#0:0/av1_qsv @ 0x5e55fb09bc80] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vost#0:0/av1_qsv @ 0x5e55fb09bc80] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[out#0/matroska @ 0x5e55faff17c0] video:0KiB audio:198KiB subtitle:0KiB other streams:0KiB global headers:3KiB muxing overhead: 3.777159%
frame=    1 fps=0.0 q=-0.0 Lsize=     205KiB time=00:00:00.00 bitrate=N/A speed=   0x
Conversion failed!

Command two just has more error messages added to the original ones.

sudo ffmpeg -hwaccel qsv -qsv_device ${DEVICE:-/dev/dri/renderD128} -extra_hw_frames 40 -an \
  -i /ssdnfs/jackryan4k.mkv \
  -c:v av1_qsv -preset veryslow -profile:v main -async_depth 1 \
  -b:v 1M -maxrate 2M -bufsize 4M \
  -rc_init_occupancy 2M -look_ahead_depth 40 -extbrc 1 \
  -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -bf 7 -g 256 -strict -1 \
  -fps_mode passthrough -y jackryan4k2.mkv

Results shortened:

Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> av1 (av1_qsv))
Press [q] to stop, [?] for help
[av1_qsv @ 0x605c80445000] Error initializing the encoder: invalid video parameters (-15)
[vost#0:0/av1_qsv @ 0x605c80387e80] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x605c803d5e40] Error sending frames to consumers: Invalid argument
[vf#0:0 @ 0x605c803d5e40] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x605c803d5e40] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/av1_qsv @ 0x605c80387e80] Could not open encoder before EOF
[vost#0:0/av1_qsv @ 0x605c80387e80] Task finished with error code: -22 (Invalid argument)
[vost#0:0/av1_qsv @ 0x605c80387e80] Terminating thread with return code -22 (Invalid argument)
[out#0/matroska @ 0x605c803f85c0] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A
Conversion failed!

@feiwan1
Copy link
Contributor

feiwan1 commented May 21, 2024

Hi @SKAntoniou ,You can compile and re-install libmfx(https://github.com/intel/vpl-gpu-rt) to intel-onevpl-24.2.3, which works for me with kernel 6.9.0.

@SKAntoniou
Copy link
Author

@feiwan1 Hi, I tried compiling libmfx on Ubuntu 24.04 with a 6.9.0 kernel using the instructions on your link, but it didn't work. Is there any chance you could give me more information on how to compile it specifically to intel-onevpl-24.2.3? I couldn't figure that bit out. Thanks.

@feiwan1
Copy link
Contributor

feiwan1 commented May 27, 2024

Hi @SKAntoniou, my steps are:
$ git clone https://github.com/intel/vpl-gpu-rt.git
$ cd vpl-gpu-rt
$ git reset --hard intel-onevpl-24.2.3
$ cmake -DCMAKE_INSTALL_PREFIX=/my/prefix
$ make&&make install

Then run a transcode cmdline with -debug verbose to make sure mfx implementation version is 2.11:
[AVHWDeviceContext @ 0x55ed3095fa40] Initialize MFX session: implementation version is 2.11

My log is in attachment.
qsv.log

@jeholliday
Copy link

I ran into the same error on Ubuntu 24.04. I found that I didn't need the 6.9 kernel. I got av1_qsv to work by using 6.8, installing vpl-gpu-rt from source, and installing everything else from the Ubuntu repos.

  1. apt install -y --no-install-recommends ffmpeg libva-dev libdrm-dev intel-media-va-driver
  2. Install vpl-gpu-rt from source as feiwan1 said above. I didn't set the install prefix, so it installed to /opt/intel/mediasdk
  3. Added the path to the libraries export LD_LIBRARY_PATH=/opt/intel/mediasdk/lib. This was the step that really gave me trouble because I didn't see this documented clearly anywhere.

It would be nice if vpl-gpu-rt could be installed from the Ubuntu repos, but I haven't found if that's possible.

@xhaihao
Copy link
Contributor

xhaihao commented Jun 3, 2024

It would be nice if vpl-gpu-rt could be installed from the Ubuntu repos, but I haven't found if that's possible.

libmfx-gen1.2 is the VPL runtime package in Ubuntu 24.04.

$ dpkg -l | grep libmfx-gen1.2
ii libmfx-gen1.2 23.2.3-1 amd64 Intel oneVPL GPU Runtime -- shared library

@SKAntoniou
Copy link
Author

Hey, thanks for all the help on this issue. Sadly, I still can't work out what is happening.

First off, I have been using 24.04 server to test these things but have just now installed a 24.04 desktop VM to see if that was the problem but they are both come with the same errors.

Second: Both -init_hw_device vaapi=va:/dev/dri/renderD128 & -hwaccel qsv methods do not work for me on 24.04. The vaapi method definitely works on 22.04 so very weird that is also broken on 24.04. Various errors depending on if I use the libmfx-gen1.2 or compile vpl-gpu-rt myself. Tried both with updating the kernel but they give the same result. libmfx-gen1.2 will give same errors as stated earlier. vpl-gpu-rt compile errors are below:

Compile myself using commands provided in this thread. The failed to set value at the end comes from "-qsv_device ${DEVICE:-/dev/dri/renderD128}" but if that is ommitted, the error will still occur but just without the end line.

[AVHWDeviceContext @ 0x6182eaf5c380] Use Intel(R) oneVPL to create MFX session, API version is 2.9, the required implementation version is 1.3
[AVHWDeviceContext @ 0x6182eaf5c380] Error creating a MFX session: -9.
Device creation failed: -1313558101.
Failed to set value '/dev/dri/renderD128' for option 'qsv_device': Unknown error occurred

One note is that during the first make command, there are a bunch of warnings or errors that are stated in terminal. I don't know C++ but they do reference a hevc header file which is what my test file I am using is initally encoded as. I will list them all below just incase that helps. This doesn't stop the compiler and am still able to make install after so couldn't tell how serious these errors are.

In file included from /usr/include/c++/13/algorithm:61,
                 from /home/stephan/vpl-gpu-rt/_studio/shared/include/mfx_error.h:25,
                 from /home/stephan/vpl-gpu-rt/_studio/shared/include/mfx_trace.h:36,
                 from /home/stephan/vpl-gpu-rt/_studio/shared/include/mfx_utils.h:32,
                 from /home/stephan/vpl-gpu-rt/_studio/shared/include/mfxvideo++int.h:36,
                 from /home/stephan/vpl-gpu-rt/_studio/shared/include/mfx_common.h:25,
                 from /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:21:
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/va/va.h:5272,
                 from /home/stephan/vpl-gpu-rt/_studio/shared/include/mfx_utils.h:39:
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset 19 into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [20, 23] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [21, 24] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [22, 25] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [23, 26] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [24, 27] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [25, 28] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [26, 29] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [27, 30] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [28, 31] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [29, 32] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:167:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:620:21: note: at offset [30, 33] into destination object ‘_VAEncPictureParameterBufferHEVC::column_width_minus1’ of size 19
  620 |     uint8_t         column_width_minus1[19];
      |                     ^~~~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset 21 into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [22, 27] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [23, 28] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [24, 29] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [25, 30] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [26, 31] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [27, 32] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [28, 33] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [29, 34] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];
      |                     ^~~~~~~~~~~~~~~~~
In function ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const short unsigned int*; _OIter = unsigned char*; _UnaryOperation = InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)::<lambda(mfxU16)>]’,
    inlined from ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’ at /home/stephan/vpl-gpu-rt/_studio/mfx_lib/encode_hw/hevc/linux/base/hevcehw_base_va_packer_lin.cpp:172:19:
/usr/include/c++/13/bits/stl_algo.h:4309:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 4309 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h: In function ‘void InitPPS(const MfxExtBuffer::Param<mfxVideoParam>&, const HEVCEHW::Base::PPS&, VAEncPictureParameterBufferHEVC&)’:
/usr/include/va/va_enc_hevc.h:623:21: note: at offset [30, 35] into destination object ‘_VAEncPictureParameterBufferHEVC::row_height_minus1’ of size 21
  623 |     uint8_t         row_height_minus1[21];

I don't really know what to try and to be honest don't understand how this is not working when you have been able to get it working on your end. For future reference, will probably only be using ubuntu server version as it is easier to manage and test on.

@xhaihao
Copy link
Contributor

xhaihao commented Jun 9, 2024

Second: Both -init_hw_device vaapi=va:/dev/dri/renderD128 & -hwaccel qsv methods do not work for me on 24.04. The vaapi method definitely works on 22.04 so very weird that is also broken on 24.04.

Seems you mixed vaapi & qsv hardware acceleration. Please use -init_hw_device qsv[=:[,key=value,...]] to create qsv device when using -hwaccel qsv.

@xhaihao
Copy link
Contributor

xhaihao commented Jun 9, 2024

Please run vainfo to check whether the environment for vaapi is correct, then run vpl-inspect to check whether the environment for vpl is correct.

@xhaihao
Copy link
Contributor

xhaihao commented Jun 9, 2024

One note is that during the first make command, there are a bunch of warnings or errors that are stated in terminal. I don't know C++ but they do reference a hevc header file which is what my test file I am using is initally encoded as. I will list them all below just incase that helps. This doesn't stop the compiler and am still able to make install after so couldn't tell how serious these errors are.

This should not be the cause of your error.

@SKAntoniou
Copy link
Author

SKAntoniou commented Jun 11, 2024

Seems you mixed vaapi & qsv hardware acceleration. Please use -init_hw_device qsv[=:[,key=value,...]] to create qsv device when using -hwaccel qsv.

Sorry, I wrote that poorly. I ran the commands correctly, but I was just stating the methods using their options in ffmpeg to be specific. To be clear, I ran them separately, but both methods do not work for me on 24.04.

Please run vainfo to check whether the environment for vaapi is correct, then run vpl-inspect to check whether the environment for vpl is correct.

The vainfo results look mostly correct but don't have the vpl-inspect command. By any chance, do you know what package that is included in or how to manually install it?

The following part is the vainfo result so you can verify that the output is correct (removed the rest of the profiles to keep it short). The start shows an error but in intel's documentation on their site, they run vainfo --display drm | grep Driver which hides that error so don't know if it matters.

error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD

@xhaihao
Copy link
Contributor

xhaihao commented Jun 12, 2024

The vainfo results look mostly correct but don't have the vpl-inspect command. By any chance, do you know what package that is included in or how to manually install it?

onevpl-tools package has vpl-inspect

The start shows an error but in intel's documentation on their site,

You may ignore the error message at the beginning.

vainfo: VA-API version: 1.20 (libva 2.12.0)

vainfo was built against libva 2.12.0 which supports VA-API 1.12, however your current VA-API version is 1.20. So I presumed your VA-API based applications (including FFmpeg) were built against libva 2.12.0, then you upgraded libva to libva 2.20.0. Could you rebuild vainfo, FFmpeg etc against libva 2.20.0 ?

Sorry, I wrote that poorly. I ran the commands correctly, but I was just stating the methods using their options in ffmpeg to be specific. To be clear, I ran them separately, but both methods do not work for me on 24.04.

Could you provide your command line using vaapi and the error message ?

@SKAntoniou
Copy link
Author

SKAntoniou commented Jun 27, 2024

onevpl-tools package has vpl-inspect

vpl-inspect output:


Warning - no implementations found by MFXEnumImplementations()

vainfo was the same

Sorry, I wrote that poorly. I ran the commands correctly, but I was just stating the methods using their options in ffmpeg to be specific. To be clear, I ran them separately, but both methods do not work for me on 24.04.

Could you provide your command line using vaapi and the error message ?

sudo ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 \
  -i /ssdnfs/jackryan4k.mkv \
  -c:v av1_qsv jackryan4k2.mp4

gives these errors

[av1_qsv @ 0x56099f9c9e40] Error creating a MFX session: -9.
[vost#0:0/av1_qsv @ 0x56099f9c9a80] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Unknown error occurred

If I add -b:v 1M or any bitrate option, the error stays the same.

@xhaihao
Copy link
Contributor

xhaihao commented Jul 9, 2024

Warning - no implementations found by MFXEnumImplementations()

So there isn't any VPL implementation in your environment. Could you check whether you have installed the corresponding packages ?

$ dpkg -l | grep libmfx
ii  libmfx-gen1.2                              23.2.3-1                                   amd64        Intel oneVPL GPU Runtime -- shared library
ii  libmfx1:amd64                              22.5.4-1                                   amd64        Intel Media SDK -- shared library

sudo ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128
-i /ssdnfs/jackryan4k.mkv
-c:v av1_qsv jackryan4k2.mp4

You created vaapi device, but used av1_qsv encoder. Could you use av1_vaapi encoder instead ?

$ sudo ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i /ssdnfs/jackryan4k.mkv  -c:v av1_vaapi jackryan4k2.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants