Everything seems fine but transcoding fails

Here is my docker compose file.

services:
  jellyfin:
    image: linuxserver/jellyfin:latest
    container_name: jellyfin
    devices:
      - /dev/dri:/dev/dri
    environment:
      - PUID=123
      - PGID=234
      # - DOCKER_MODS=linuxserver/mods:jellyfin-opencl-intel
      # I have tried the above env var, but not working
    volumes:
      - /jellyfin_config:/config
    ports:
      - 8096:8096
    restart: unless-stopped

permission seems ok

root@a4b8c7d8c01b:/# ls -l /dev/dri/
total 0
crw-rw---- 1 root root      226,   0 May  5 23:37 card0
crw-rw---- 1 root video4x4s 226, 128 May  5 23:37 renderD128

driver seems ok

root@a4b8c7d8c01b:/#  /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/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.20.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.1 (f5f09c4)
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
...

but it just doesn’t work

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v hevc_qsv -autorotate 0 -i file:"/data/ABC.mp4" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 6345120 -maxrate 6345120 -bufsize 12690240 -g:v:0 90 -keyint_min:v:0 90 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_qsv=format=nv12" -codec:a:0 libfdk_aac -ac 2 -ab 77988 -ar 44100 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/config/data/transcodes/6871d07c9a1eccad6f2fa56433ccc894%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/6871d07c9a1eccad6f2fa56433ccc894.m3u8"


ffmpeg version 5.1.4-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x555e7f15c9c0] stream 0, timescale not set
[extract_extradata @ 0x555e7f1d42c0] Invalid NAL unit 0, skipping.
    Last message repeated 1 times
[hevc @ 0x555e7f162e80] Invalid NAL unit 0, skipping.
    Last message repeated 1 times
[hevc @ 0x555e7f162e80] PPS id out of range: 34664
[hevc @ 0x555e7f162e80] Error parsing NAL unit #0.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x555e7f15c9c0] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x555e7f15c9c0] Could not find codec parameters for stream 2 (Video: hevc, none): unspecified size
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:/data/ABC.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomdby1iso2mp41
    creation_time   : 2024-03-09T04:19:58.000000Z
    title           : ABC
    artist          : DEF
    album           : EFG
    encoder         : Lavf60.3.100
    description     : FGH
  Duration: 00:00:38.62, start: 0.000000, bitrate: 4018 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 1920x1080 [SAR 1:1 DAR 16:9], 3807 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      creation_time   : 2024-03-09T04:19:58.000000Z
      handler_name    : Bento4 Video Handler
      vendor_id       : [0][0][0][0]
      encoder         : HEVC Coding
    Side data:
      DOVI configuration record: version: 1.0, profile: 8, level: 4, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 4
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 77 kb/s (default)
    Metadata:
      creation_time   : 2024-03-09T04:19:58.000000Z
      handler_name    : Bento4 Sound Handler
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x0]: Video: hevc, none, 90k tbr, 90k tbn (attached pic)
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[hevc_qsv @ 0x555e7f1dc8c0] Error during QSV decoding.: device failed (-17)
Error while decoding stream #0:0: Input/output error
[hevc_qsv @ 0x555e7f1dc8c0] Error during QSV decoding.: device failed (-17)
Error while decoding stream #0:0: Input/output error
[hevc_qsv @ 0x555e7f1dc8c0] Error during QSV decoding.: device failed (-17)
Error while decoding stream #0:0: Input/output error
[hevc_qsv @ 0x555e7f1dc8c0] Error during QSV decoding.: device failed (-17)
Error while decoding stream #0:0: Input/output error
[hevc_qsv @ 0x555e7f1dc8c0] Error during QSV decoding.: unknown error (-21)
Error while decoding stream #0:0: Unknown error occurred
[hevc_qsv @ 0x555e7f1dc8c0] Error during QSV decoding.: unknown error (-21)
Error while decoding stream #0:0: Unknown error occurred

Could anyone help? thanks