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

Playback broken with jellyfin-androidtv #99

Closed
zehnerGIT opened this issue Mar 2, 2022 · 26 comments
Closed

Playback broken with jellyfin-androidtv #99

zehnerGIT opened this issue Mar 2, 2022 · 26 comments

Comments

@zehnerGIT
Copy link

zehnerGIT commented Mar 2, 2022

I've installed jellyfin-stable on my nas (Ubuntu 20.04 with HWE-stack) from your repository. It's installed directly, no container or vm. Since the last jellyfin-ffmpeg update on 28.02, jellyfin-androidtv (0.12.3) wants to transcode many videos (unnecessarily) and playback fails (with ExoPlayer forced, libVLC plays, but is unusable, because of missing passthrough). Before the update, transcoding was not necessary and direct playback worked. The jellyfin-ffmpeg update was the only jellyfin update in the last time, so this update should be the reason.

a few apt-cache results

jellyfin:
  Installed: 10.7.7-1
  Candidate: 10.7.7-1
  Version table:
 *** 10.7.7-1 500
        500 https://repo.jellyfin.org/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

jellyfin-ffmpeg:
  Installed: 4.4.1-2-focal
  Candidate: 4.4.1-2-focal
  Version table:
 *** 4.4.1-2-focal 500

libva2:
  Installed: 2.7.0-2
  Candidate: 2.7.0-2
  Version table:
 *** 2.7.0-2 500
        500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

intel-media-va-driver-non-free:
  Installed: 20.1.1+ds1-1build1
  Candidate: 20.1.1+ds1-1build1
  Version table:
 *** 20.1.1+ds1-1build1 500
        500 http://de.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages
        100 /var/lib/dpkg/status

uname -a

Linux nas 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

vainfo

libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.4.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD

transcoding logs:
1)

/videos/cec95a09-be1c-d980-0eae-bb82e144b6a6/stream.mkv

{"Protocol":0,"Id":"cec95a09be1cd9800eaebb82e144b6a6","Path":"/srv/shares/public/video/Filme/Beast.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":8156379310,"Name":"Beast","IsRemote":false,"ETag":"1f16b8835f0b9af7de26853937452af8","RunTimeTicks":64184000000,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"h264","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"1080p H264 SDR","NalLengthSize":"0","IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":10166246,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":804,"Width":1920,"AverageFrameRate":24,"RealFrameRate":24,"Profile":"High","Type":1,"AspectRatio":"2.40:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":41,"IsAnamorphic":null},{"Codec":"dts","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Ger - DTS - 5.1 - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":1536000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":"DTS","Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"dts","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"En - DTS - 5.1","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":1536000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":"DTS","Type":0,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"PGSSUB","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"forced","VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"forced - Ger - Erzwungen","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":true,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":3,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"PGSSUB","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"complete","VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"complete - Ger","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":4,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":13238246,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/srv/shares/public/video/Filme/Beast.mkv" -map 0:0 -map 0:1 -codec:v:0 h264_vaapi -force_key_frames "expr:gte(t,n_forced*5)" -filter_complex "[0:3]scale=1920x804[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload" -copyts -avoid_negative_ts disabled -start_at_zero -b:v 10166246 -maxrate 10166246 -bufsize 20332492 -profile:v:0 high -level 41 -vsync -1 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 ac3 -ac 6 -ab 640000 -y "/var/lib/jellyfin/transcodes/0a2902b36036106b30c13afb47fc689d.mkv"


ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[AVHWDeviceContext @ 0x5601fb8ca640] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
[matroska,webm @ 0x5601fb8e7a00] 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 @ 0x5601fb8e7a00] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from 'file:/srv/shares/public/video/Filme/Beast.mkv':
  Metadata:
    encoder         : libebml v1.3.6 + libmatroska v1.4.9
    creation_time   : 2019-11-05T16:28:20.000000Z
  Duration: 01:46:58.40, start: 0.000000, bitrate: 10166 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 536.500000
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 536.500000, end 1104.541000
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 1104.541000, end 1788.083000
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1788.083000, end 2298.125000
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 2298.125000, end 3005.750000
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 3005.750000, end 3568.500000
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 3568.500000, end 4042.291000
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 4042.291000, end 4595.750000
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 4595.750000, end 5111.291000
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 5111.291000, end 5623.958000
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 5623.958000, end 6196.166000
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 6196.166000, end 6418.400000
      Metadata:
        title           : Chapter 12
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x804 [SAR 1:1 DAR 160:67], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
    Metadata:
      BPS-eng         : 7135790
      DURATION-eng    : 01:46:58.375000000
      NUMBER_OF_FRAMES-eng: 154041
      NUMBER_OF_BYTES-eng: 5725022582
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-05 16:28:20
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
    Metadata:
      BPS-eng         : 1509000
      DURATION-eng    : 01:46:58.400000000
      NUMBER_OF_FRAMES-eng: 601725
      NUMBER_OF_BYTES-eng: 1210670700
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-05 16:28:20
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      BPS-eng         : 1509000
      DURATION-eng    : 01:46:58.400000000
      NUMBER_OF_FRAMES-eng: 601725
      NUMBER_OF_BYTES-eng: 1210670700
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-05 16:28:20
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(ger): Subtitle: hdmv_pgs_subtitle (forced)
    Metadata:
      title           : forced
      BPS-eng         : 238
      DURATION-eng    : 00:25:55.833000000
      NUMBER_OF_FRAMES-eng: 4
      NUMBER_OF_BYTES-eng: 46419
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-05 16:28:20
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(ger): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : complete
      BPS-eng         : 16127
      DURATION-eng    : 01:39:02.750000000
      NUMBER_OF_FRAMES-eng: 1388
      NUMBER_OF_BYTES-eng: 11979887
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-05 16:28:20
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 (h264) -> format (graph 0)
  Stream #0:3 (pgssub) -> scale (graph 0)
  hwupload (graph 0) -> Stream #0:0 (h264_vaapi)
  Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x5601fb8e7a00] sub2video: using 1920x804 canvas
Output #0, matroska, to '/var/lib/jellyfin/transcodes/0a2902b36036106b30c13afb47fc689d.mkv':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (High) (H264 / 0x34363248), vaapi_vld(progressive), 1920x804 [SAR 1:1 DAR 160:67], q=2-31, 10166 kb/s, 24 fps, 1k tbn (default)
    Metadata:
      encoder         : Lavc58.134.100 h264_vaapi
  Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1, fltp, 640 kb/s (default)
    Metadata:
      encoder         : Lavc58.134.100 ac3
[h264_vaapi @ 0x5601fb918f40] Failed to sync to output buffer completion: 5 (invalid VAContextID).
Video encoding failed
[h264_vaapi @ 0x5601fb918f40] Failed to sync to output buffer completion: 5 (invalid VAContextID).
Conversion failed!

2)

/videos/f4e967ca-0200-6d25-07ba-387ac93d5b00/stream.mkv

{"Protocol":0,"Id":"f4e967ca02006d2507ba387ac93d5b00","Path":"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E08.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":1013444992,"Name":"Brockmire-S01E08","IsRemote":false,"ETag":"c09c104a20444b10471d9b52d5251977","RunTimeTicks":13853840384,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"480p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5852211,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":480,"Width":720,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":null},{"Codec":"ac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Surround 5.1","VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Surround 5.1 - En - Dolby Digital - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":448000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"DVDSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"En - Standard","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":6300211,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E08.mkv" -map 0:0 -map 0:1 -codec:v:0 h264_vaapi -force_key_frames "expr:gte(t,n_forced*5)" -filter_complex "[0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload" -copyts -avoid_negative_ts disabled -start_at_zero -b:v 5852211 -maxrate 5852211 -bufsize 11704422 -profile:v:0 high -level 41 -vsync -1 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 ac3 -ac 6 -ab 448000 -y "/var/lib/jellyfin/transcodes/d251ebad042b9572bc391fe7a1ea80e6.mkv"


ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[AVHWDeviceContext @ 0x560757b1f640] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
Input #0, matroska,webm, from 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E08.mkv':
  Metadata:
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) x86_64-linux-gnu
    creation_time   : 2021-12-05T10:39:14.000000Z
  Duration: 00:23:05.38, start: 0.000000, bitrate: 5852 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 391.557833
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 391.557833, end 646.145500
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 646.145500, end 871.036833
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 871.036833, end 1385.384000
      Metadata:
        title           : Chapter 04
  Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
    Metadata:
      BPS-eng         : 5390907
      DURATION-eng    : 00:23:05.384000000
      NUMBER_OF_FRAMES-eng: 33216
      NUMBER_OF_BYTES-eng: 933559635
      SOURCE_ID-eng   : 0100E0
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:39:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Side data:
      cpb: bitrate max/min/avg: 8500000/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 448000
      DURATION-eng    : 00:23:05.152000000
      NUMBER_OF_FRAMES-eng: 43286
      NUMBER_OF_BYTES-eng: 77568512
      SOURCE_ID-eng   : 0180BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:39:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Subtitle: dvd_subtitle, 720x480 (default)
    Metadata:
      BPS-eng         : 8589
      DURATION-eng    : 00:22:51.168111111
      NUMBER_OF_FRAMES-eng: 500
      NUMBER_OF_BYTES-eng: 1472228
      SOURCE_ID-eng   : 0120BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:39:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream mapping:
  Stream #0:0 (mpeg2video) -> format (graph 0)
  Stream #0:2 (dvdsub) -> scale (graph 0)
  hwupload (graph 0) -> Stream #0:0 (h264_vaapi)
  Stream #0:1 -> #0:1 (ac3 (native) -> ac3 (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x560757b3ca00] sub2video: using 720x480 canvas
Output #0, matroska, to '/var/lib/jellyfin/transcodes/d251ebad042b9572bc391fe7a1ea80e6.mkv':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (High) (H264 / 0x34363248), vaapi_vld(tv, progressive), 720x480 [SAR 186:157 DAR 279:157], q=2-31, 5852 kb/s, 29.97 fps, 1k tbn (default)
    Metadata:
      encoder         : Lavc58.134.100 h264_vaapi
  Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1, fltp, 448 kb/s (default)
    Metadata:
      encoder         : Lavc58.134.100 ac3
[h264_vaapi @ 0x560757b88580] Failed to sync to output buffer completion: 5 (invalid VAContextID).
Video encoding failed
[h264_vaapi @ 0x560757b88580] Failed to sync to output buffer completion: 5 (invalid VAContextID).
Conversion failed!
@Shadowghost
Copy link
Contributor

Can you please post the output of /usr/lib/jellyfin-ffmpeg/vainfo and what CPU you are using?

Depending on the latter you should check if QSV (Intel QuickSync) works.

@zehnerGIT
Copy link
Author

zehnerGIT commented Mar 2, 2022

Thanks for your reply. I will try QSV and report back. Last time I checked, VAAPI worked better, so I've configured VAAPI.

/usr/lib/jellyfin-ffmpeg/vainfo

libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva error: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.15 (libva 2.15.0.pre1)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.4.0.pre1 (                                                                                                                                                             )
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD

CPU is an old Celeron
**cat /proc/cpuinfo**
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 76
model name      : Intel(R) Celeron(R) CPU  J3160  @ 1.60GHz
stepping        : 4
microcode       : 0x411
cpu MHz         : 480.000
cache size      : 1024 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat md_clear
vmx flags       : vnmi preemption_timer invvpid ept_x_only flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest
bugs            : cpu_meltdown spectre_v1 spectre_v2 mds msbds_only
bogomips        : 3200.00
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

@zehnerGIT
Copy link
Author

zehnerGIT commented Mar 2, 2022

similiar problem with QSV (this time playback with web client, I don't have access to my FireTV at the moment)

/videos/484a0660-9410-1215-f29e-634152c78a4c/hls1/main/0.ts

{"Protocol":0,"Id":"484a066094101215f29e634152c78a4c","Path":"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":965276992,"Name":"Brockmire-S01E03","IsRemote":false,"ETag":"4e96544892fd248818e76b500c90ff82","RunTimeTicks":12952939520,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"480p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5961747,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":480,"Width":720,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":null},{"Codec":"ac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Surround 5.1","VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Surround 5.1 - En - Dolby Digital - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":448000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"DVDSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"En - Standard","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":6409747,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -c:v mpeg2_qsv -init_hw_device qsv=hw -filter_hw_device hw -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 5961747 -maxrate 5961747 -bufsize 11923494 -profile:v:0 high -level 41 -g:v:0 90 -keyint_min:v:0 90 -sc_threshold:v:0 0 -filter_complex "[0:2]scale=720x480,hwupload=extra_hw_frames=64[sub];[0:0]hwupload=extra_hw_frames=64,vpp_qsv=format=nv12[base];[base][sub]overlay_qsv" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 640000 -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 "/var/lib/jellyfin/transcodes/e18f9251587d7be8fef05b5fee753c31%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/e18f9251587d7be8fef05b5fee753c31.m3u8"


ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[AVHWDeviceContext @ 0x55aa3ede5c00] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
[AVHWDeviceContext @ 0x55aa3ede5c00] Failed to initialise VAAPI connection: 1 (operation failed).
Device creation failed: -5.
Failed to set value 'qsv=hw' for option 'init_hw_device': Input/output error
Error parsing global options: Input/output error

@Shadowghost
Copy link
Contributor

Shadowghost commented Mar 2, 2022

In theory Braswell is a GEN8 architecture which is equivalent to Broadwell which supports VAAPI and QSV with the Intel non-free (iHD) driver we use per default (source).

The thing is that it seems to not initialize for you (as shown in the ffmpeg log and the output of vainfo.

I'm currently working on a way to manually override the used driver nonetheless and still have no idea why the init is failing in your case.

@Shadowghost
Copy link
Contributor

Shadowghost commented Mar 2, 2022

Can you please download and install this build of jellyfin-ffmpeg and try running the following commands and check if they succeed?

export LIBVA_DRIVER_NAME=i915
<insert exact ffmpeg command from jellyfin log here>

@zehnerGIT
Copy link
Author

zehnerGIT commented Mar 2, 2022

sorry, can't install the deb. It seems to be for Debian bullseye, I've Ubuntu Focal, so install leads to

Preparing to unpack jellyfin-ffmpeg_4.4.1-2-bullseye_amd64.deb ... Unpacking jellyfin-ffmpeg (4.4.1-2-bullseye) over (4.4.1-2-focal) ... dpkg: dependency problems prevent configuration of jellyfin-ffmpeg

@nyanmisaka
Copy link
Member

nyanmisaka commented Mar 2, 2022

@Shadowghost
Copy link
Contributor

My bad, I should have checked your OS before posting.

After checking the backend code I suppose the problem lies within our handling of the existence of multiple drivers in Jellyfin 10.7.x - there is no fallback to specific drivers, the ffmpeg default is used and that seems to be the iHD driver.

This behaviour was changed in 10.8 which explicitly sets the driver. So if you have a chance to try 10.8 I'd be interested in the results. Until then the only solution will be downgrading jellyfin-ffmpeg I guess...

@nyanmisaka
Copy link
Member

nyanmisaka commented Mar 2, 2022

This behaviour was changed in 10.8 which explicitly sets the driver. So if you have a chance to try 10.8 I'd be interested in the results. Until then the only solution will be downgrading jellyfin-ffmpeg I guess...

We didn't set the driver explicitly. QSV only support iHD driver but iHD driver is not supported on Barswell chips.

[h264_vaapi @ 0x5601fb918f40] Failed to sync to output buffer completion: 5 (invalid VAContextID).
This error in VAAPI seems to be a regression from this patch and the legacy i965 driver cannot handle it well.

I will update this patch soon.

@zehnerGIT
Copy link
Author

Thanks guys. Just leave me a note, if you want me to test new patches/versions, but at the moment I've downgraded to jellyfin-ffmpeg_4.4.1-1-focal_amd64, switched back to VAAPI (QSV does also not work with the older ffmpeg) and playback works again. I will wait for at least 1.8.2, before I switch to the 1.8 version.

Just for completeness:
even with the older ffmpeg, I get an
[AVHWDeviceContext @ 0x56450a7e1640] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
but then it doesn't stop with Failed to initialise VAAPI connection (like the current ffmpeg) and playback starts. For the commandline tests with the current ffmpeg I gave my jellyfin user a bash
su -s /bin/bash jellyfin
to prevent problems with access rights and tested with different overrides
export LIBVA_DRIVER_NAME=i915
export LIBVA_DRIVER_NAME=i965
export MESA_LOADER_DRIVER_OVERRIDE=i915
export MESA_LOADER_DRIVER_OVERRIDE=i965
but no playback with the current ffmpeg in any case. The older version doesn't need any of the overrides and uses i965

@Shadowghost
Copy link
Contributor

@zehnerGIT: I compiled jellyfin-ffmpeg with #100 and #101 applied if you want to check if it works: Google Drive

@zehnerGIT
Copy link
Author

@zehnerGIT: I compiled jellyfin-ffmpeg with #100 and #101 applied if you want to check if it works: Google Drive

After an update to your version, playback (web-client) with VAAPI does no longer work. Playback of this video was OK with the older ffmpeg-version:

/videos/484a0660-9410-1215-f29e-634152c78a4c/hls1/main/0.ts

{"Protocol":0,"Id":"484a066094101215f29e634152c78a4c","Path":"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":965276992,"Name":"Brockmire-S01E03","IsRemote":false,"ETag":"4e96544892fd248818e76b500c90ff82","RunTimeTicks":12952939520,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"480p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5961747,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":480,"Width":720,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":null},{"Codec":"ac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Surround 5.1","VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Surround 5.1 - En - Dolby Digital - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":448000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"DVDSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"En - Standard","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":6409747,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 h264_vaapi -b:v 5961747 -maxrate 5961747 -bufsize 11923494 -profile:v:0 high -level 41 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -filter_complex "[0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 640000 -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 "/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0.m3u8"

ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVHWDeviceContext @ 0x55f345e127c0] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
Input #0, matroska,webm, from 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv':
Metadata:
encoder : libmakemkv v1.16.5 (1.3.10/1.5.2) x86_64-linux-gnu
creation_time : 2021-12-05T10:33:16.000000Z
Duration: 00:21:35.29, start: 0.000000, bitrate: 5961 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 452.952500
Metadata:
title : Chapter 01
Chapter #0:1: start 452.952500, end 605.104500
Metadata:
title : Chapter 02
Chapter #0:2: start 605.104500, end 967.299667
Metadata:
title : Chapter 03
Chapter #0:3: start 967.299667, end 1295.294000
Metadata:
title : Chapter 04
Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
BPS-eng : 5499130
DURATION-eng : 00:21:35.294000000
NUMBER_OF_FRAMES-eng: 31056
NUMBER_OF_BYTES-eng: 890373768
SOURCE_ID-eng : 0100E0
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Side data:
cpb: bitrate max/min/avg: 8500000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
title : Surround 5.1
BPS-eng : 448000
DURATION-eng : 00:21:35.072000000
NUMBER_OF_FRAMES-eng: 40471
NUMBER_OF_BYTES-eng: 72524032
SOURCE_ID-eng : 0180BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
BPS-eng : 9903
DURATION-eng : 00:21:25.012955555
NUMBER_OF_FRAMES-eng: 472
NUMBER_OF_BYTES-eng: 1590772
SOURCE_ID-eng : 0120BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream mapping:
Stream #0:0 (mpeg2video) -> format (graph 0)
Stream #0:2 (dvdsub) -> scale (graph 0)
hwupload (graph 0) -> Stream #0:0 (h264_vaapi)
Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x55f345e2fb00] sub2video: using 720x480 canvas
Output #0, hls, to '/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0.m3u8':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (High), vaapi_vld(tv, progressive), 720x480 [SAR 186:157 DAR 279:157], q=2-31, 5961 kb/s, 29.97 fps, 90k tbn (default)
Metadata:
encoder : Lavc58.134.100 h264_vaapi
Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 640 kb/s (default)
Metadata:
encoder : Lavc58.134.100 aac
[h264_vaapi @ 0x55f345e464c0] Failed to sync to output buffer completion: 5 (invalid VAContextID).
Video encoding failed
[h264_vaapi @ 0x55f345e464c0] Failed to sync to output buffer completion: 5 (invalid VAContextID).
[aac @ 0x55f345e98fc0] Qavg: 65536.000
[aac @ 0x55f345e98fc0] 2 frames left in the queue on closing
Conversion failed!

@zehnerGIT
Copy link
Author

The same for QSV:

/videos/484a0660-9410-1215-f29e-634152c78a4c/hls1/main/0.ts

{"Protocol":0,"Id":"484a066094101215f29e634152c78a4c","Path":"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":965276992,"Name":"Brockmire-S01E03","IsRemote":false,"ETag":"4e96544892fd248818e76b500c90ff82","RunTimeTicks":12952939520,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"480p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5961747,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":480,"Width":720,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":null},{"Codec":"ac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Surround 5.1","VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Surround 5.1 - En - Dolby Digital - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":448000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"DVDSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"En - Standard","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":6409747,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -c:v mpeg2_qsv -init_hw_device qsv=hw -filter_hw_device hw -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 5961747 -maxrate 5961747 -bufsize 11923494 -profile:v:0 high -level 41 -g:v:0 90 -keyint_min:v:0 90 -sc_threshold:v:0 0 -filter_complex "[0:2]scale=720x480,hwupload=extra_hw_frames=64[sub];[0:0]hwupload=extra_hw_frames=64,vpp_qsv=format=nv12[base];[base][sub]overlay_qsv" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 640000 -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 "/var/lib/jellyfin/transcodes/d1f27f7ad96b75e5d8d3ee228c630712%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/d1f27f7ad96b75e5d8d3ee228c630712.m3u8"

ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVHWDeviceContext @ 0x55f3d33b3c00] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
[AVHWDeviceContext @ 0x55f3d33b3c00] Failed to initialise VAAPI connection: 1 (operation failed).
Device creation failed: -5.
Failed to set value 'qsv=hw' for option 'init_hw_device': Input/output error
Error parsing global options: Input/output error

@zehnerGIT
Copy link
Author

Just for completeness, here a working playback after the downgrade to the older ffmpeg (and switch to VAAPI):

/videos/484a0660-9410-1215-f29e-634152c78a4c/hls1/main/0.ts

{"Protocol":0,"Id":"484a066094101215f29e634152c78a4c","Path":"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":965276992,"Name":"Brockmire-S01E03","IsRemote":false,"ETag":"4e96544892fd248818e76b500c90ff82","RunTimeTicks":12952939520,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"480p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5961747,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":480,"Width":720,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":null},{"Codec":"ac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Surround 5.1","VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Surround 5.1 - En - Dolby Digital - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":448000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"DVDSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"En - Standard","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":6409747,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 h264_vaapi -b:v 5961747 -maxrate 5961747 -bufsize 11923494 -profile:v:0 high -level 41 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -filter_complex "[0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 640000 -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 "/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e325%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e325.m3u8"

ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVHWDeviceContext @ 0x557b147c77c0] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
Input #0, matroska,webm, from 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv':
Metadata:
encoder : libmakemkv v1.16.5 (1.3.10/1.5.2) x86_64-linux-gnu
creation_time : 2021-12-05T10:33:16.000000Z
Duration: 00:21:35.29, start: 0.000000, bitrate: 5961 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 452.952500
Metadata:
title : Chapter 01
Chapter #0:1: start 452.952500, end 605.104500
Metadata:
title : Chapter 02
Chapter #0:2: start 605.104500, end 967.299667
Metadata:
title : Chapter 03
Chapter #0:3: start 967.299667, end 1295.294000
Metadata:
title : Chapter 04
Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
BPS-eng : 5499130
DURATION-eng : 00:21:35.294000000
NUMBER_OF_FRAMES-eng: 31056
NUMBER_OF_BYTES-eng: 890373768
SOURCE_ID-eng : 0100E0
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Side data:
cpb: bitrate max/min/avg: 8500000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
title : Surround 5.1
BPS-eng : 448000
DURATION-eng : 00:21:35.072000000
NUMBER_OF_FRAMES-eng: 40471
NUMBER_OF_BYTES-eng: 72524032
SOURCE_ID-eng : 0180BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
BPS-eng : 9903
DURATION-eng : 00:21:25.012955555
NUMBER_OF_FRAMES-eng: 472
NUMBER_OF_BYTES-eng: 1590772
SOURCE_ID-eng : 0120BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream mapping:
Stream #0:0 (mpeg2video) -> format (graph 0)
Stream #0:2 (dvdsub) -> scale (graph 0)
hwupload (graph 0) -> Stream #0:0 (h264_vaapi)
Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x557b147e2d00] sub2video: using 720x480 canvas
Output #0, hls, to '/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e325.m3u8':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (High), vaapi_vld(tv, progressive), 720x480 [SAR 186:157 DAR 279:157], q=2-31, 5961 kb/s, 29.97 fps, 90k tbn (default)
Metadata:
encoder : Lavc58.134.100 h264_vaapi
Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 640 kb/s (default)
Metadata:
encoder : Lavc58.134.100 aac
frame= 2 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x
frame= 21 fps=0.0 q=-0.0 size=N/A time=00:00:00.19 bitrate=N/A dup=4 drop=0 speed=0.352x
frame= 47 fps= 45 q=-0.0 size=N/A time=00:00:01.00 bitrate=N/A dup=9 drop=0 speed=0.95x
frame= 67 fps= 43 q=-0.0 size=N/A time=00:00:01.66 bitrate=N/A dup=13 drop=0 speed=1.07x
frame= 85 fps= 41 q=-0.0 size=N/A time=00:00:02.23 bitrate=N/A dup=17 drop=0 speed=1.09x
[hls @ 0x557b147f6e80] Opening '/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e3250.ts' for writing
frame= 104 fps= 40 q=-0.0 size=N/A time=00:00:02.94 bitrate=N/A dup=20 drop=0 speed=1.14x
frame= 127 fps= 41 q=-0.0 size=N/A time=00:00:03.69 bitrate=N/A dup=25 drop=0 speed= 1.2x
frame= 151 fps= 42 q=-0.0 size=N/A time=00:00:04.45 bitrate=N/A dup=30 drop=0 speed=1.24x
frame= 174 fps= 42 q=-0.0 size=N/A time=00:00:05.22 bitrate=N/A dup=35 drop=0 speed=1.27x
[hls @ 0x557b147f6e80] Opening '/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e3251.ts' for writing
frame= 193 fps= 42 q=-0.0 size=N/A time=00:00:05.93 bitrate=N/A dup=38 drop=0 speed=1.28x
frame= 218 fps= 42 q=-0.0 size=N/A time=00:00:06.69 bitrate=N/A dup=43 drop=0 speed= 1.3x
frame= 243 fps= 43 q=-0.0 size=N/A time=00:00:07.48 bitrate=N/A dup=48 drop=0 speed=1.32x
frame= 265 fps= 43 q=-0.0 size=N/A time=00:00:08.29 bitrate=N/A dup=53 drop=0 speed=1.35x
[hls @ 0x557b147f6e80] Opening '/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e3252.ts' for writing
frame= 289 fps= 43 q=-0.0 size=N/A time=00:00:09.06 bitrate=N/A dup=58 drop=0 speed=1.36x
[hls @ 0x557b147f6e80] Opening '/var/lib/jellyfin/transcodes/e39d7aced9e8ac362782165ebf14e3253.ts' for writing
frame= 300 fps= 43 q=-0.0 Lsize=N/A time=00:00:09.42 bitrate=N/A dup=60 drop=0 speed=1.36x
video:7010kB audio:645kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x557b1484aa40] Qavg: 65138.160

@nyanmisaka
Copy link
Member

@zehnerGIT
Can you run this command with the test build mentioned above and share the full ffmpeg log?

/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device vaapi=va:,driver=i965 -hwaccel vaapi -hwaccel_output_format vaapi -filter_hw_device va -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 h264_vaapi -b:v 5961747 -maxrate 5961747 -bufsize 11923494 -profile:v:0 high -level 41 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -filter_complex "[0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 640000 -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 "/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0.m3u8"

@zehnerGIT
Copy link
Author

I switched to the jellyfin user with
su -s /bin/bash jellyfin
and logged the commandline output with
your command 2>&1 | tee /srv/shares/public/jellyfin/ffmpeg.log

Is this the right approach?

Output (only the first few hundred lines):

ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vaapi=va:,driver=i965'.
Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW accelerated decoding) with argument 'vaapi'.
Reading option '-hwaccel_output_format' ... matched as option 'hwaccel_output_format' (select output format used with HW accelerated decoding) with argument 'vaapi'.
Reading option '-filter_hw_device' ... matched as option 'filter_hw_device' (set hardware device used when filtering) with argument 'va'.
Reading option '-i' ... matched as input url with argument 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv'.
Reading option '-map_metadata' ... matched as option 'map_metadata' (set metadata information of outfile from infile) with argument '-1'.
Reading option '-map_chapters' ... matched as option 'map_chapters' (set chapters mapping) with argument '-1'.
Reading option '-threads' ... matched as AVOption 'threads' with argument '0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1'.
Reading option '-codec:v:0' ... matched as option 'codec' (codec name) with argument 'h264_vaapi'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '5961747'.
Reading option '-maxrate' ... matched as AVOption 'maxrate' with argument '5961747'.
Reading option '-bufsize' ... matched as AVOption 'bufsize' with argument '11923494'.
Reading option '-profile:v:0' ... matched as option 'profile' (set profile) with argument 'high'.
Reading option '-level' ... matched as AVOption 'level' with argument '41'.
Reading option '-force_key_frames:0' ... matched as option 'force_key_frames' (force key frames at specified timestamps) with argument 'expr:gte(t,0+n_forced3)'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload'.
Reading option '-start_at_zero' ... matched as option 'start_at_zero' (shift input timestamps to start at 0 when using copyts) with argument '1'.
Reading option '-vsync' ... matched as option 'vsync' (video sync method) with argument '-1'.
Reading option '-codec:a:0' ... matched as option 'codec' (codec name) with argument 'aac'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '6'.
Reading option '-ab' ... matched as option 'ab' (audio bitrate (please use -b:a)) with argument '640000'.
Reading option '-copyts' ... matched as option 'copyts' (copy timestamps) with argument '1'.
Reading option '-avoid_negative_ts' ... matched as AVOption 'avoid_negative_ts' with argument 'disabled'.
Reading option '-max_muxing_queue_size' ... matched as option 'max_muxing_queue_size' (maximum number of packets that can be buffered while waiting for all streams to initialize) with argument '2048'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'hls'.
Reading option '-max_delay' ... matched as AVOption 'max_delay' with argument '5000000'.
Reading option '-hls_time' ... matched as AVOption 'hls_time' with argument '3'.
Reading option '-hls_segment_type' ... matched as AVOption 'hls_segment_type' with argument 'mpegts'.
Reading option '-start_number' ... matched as AVOption 'start_number' with argument '0'.
Reading option '-hls_segment_filename' ... matched as AVOption 'hls_segment_filename' with argument '/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0%d.ts'.
Reading option '-hls_playlist_type' ... matched as AVOption 'hls_playlist_type' with argument 'vod'.
Reading option '-hls_list_size' ... matched as AVOption 'hls_list_size' with argument '0'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '/var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0.m3u8' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument vaapi=va:,driver=i965.
[AVHWDeviceContext @ 0x55c3bb66f940] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x55c3bb66f940] libva: VA-API version 1.15.0
[AVHWDeviceContext @ 0x55c3bb66f940] libva: User requested driver 'i965'
[AVHWDeviceContext @ 0x55c3bb66f940] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/i965_drv_video.so
[AVHWDeviceContext @ 0x55c3bb66f940] libva: Found init function __vaDriverInit_1_15
[AVHWDeviceContext @ 0x55c3bb66f940] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55c3bb66f940] Initialised VAAPI connection: version 1.15
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x48323234 -> yuv422p.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x55c3bb66f940] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x55c3bb66f940] VAAPI driver: Intel i965 driver for Intel(R) CherryView - 2.4.0.pre1 ().
[AVHWDeviceContext @ 0x55c3bb66f940] Driver not found in known nonstandard list, using standard behaviour.
Applying option filter_hw_device (set hardware device used when filtering) with argument va.
Applying option filter_complex (create a complex filtergraph) with argument [0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload.
Applying option start_at_zero (shift input timestamps to start at 0 when using copyts) with argument 1.
Applying option vsync (video sync method) with argument -1.
Applying option copyts (copy timestamps) with argument 1.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv.
Applying option hwaccel (use HW accelerated decoding) with argument vaapi.
Applying option hwaccel_output_format (select output format used with HW accelerated decoding) with argument vaapi.
Successfully parsed a group of options.
Opening an input file: file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv.
[NULL @ 0x55c3bb67f8c0] Opening 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv' for reading
[file @ 0x55c3bb680500] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0x55c3bb67f8c0] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
[matroska,webm @ 0x55c3bb67f8c0] Before avformat_find_stream_info() pos: 3400 bytes read:33995 seeks:2 nb_streams:3
[dvdsub @ 0x55c3bb692300] palette: 0x0000e1 0xe83f07 0x000000 0xfdfdfd 0xe9ebc2 0xd53a07 0xfaff1a 0x095d76 0x7c7c7c 0xe0e0e0 0x701f03 0x077307 0x00006c 0xcc0ae9 0xd2ab0f 0x730972
[mpeg2video @ 0x55c3bb687c40] Format yuv420p chosen by get_format().
[matroska,webm @ 0x55c3bb67f8c0] All info found
[matroska,webm @ 0x55c3bb67f8c0] After avformat_find_stream_info() pos: 130135 bytes read:187807 seeks:2 frames:4
Input #0, matroska,webm, from 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv':
Metadata:
encoder : libmakemkv v1.16.5 (1.3.10/1.5.2) x86_64-linux-gnu
creation_time : 2021-12-05T10:33:16.000000Z
Duration: 00:21:35.29, start: 0.000000, bitrate: 5961 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 452.952500
Metadata:
title : Chapter 01
Chapter #0:1: start 452.952500, end 605.104500
Metadata:
title : Chapter 02
Chapter #0:2: start 605.104500, end 967.299667
Metadata:
title : Chapter 03
Chapter #0:3: start 967.299667, end 1295.294000
Metadata:
title : Chapter 04
Stream #0:0(eng), 2, 1/1000: Video: mpeg2video (Main), 1 reference frame, yuv420p(tv, progressive, left), 720x480 [SAR 32:27 DAR 16:9], 0/1, SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
BPS-eng : 5499130
DURATION-eng : 00:21:35.294000000
NUMBER_OF_FRAMES-eng: 31056
NUMBER_OF_BYTES-eng: 890373768
SOURCE_ID-eng : 0100E0
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Side data:
cpb: bitrate max/min/avg: 8500000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1(eng), 2, 1/1000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
title : Surround 5.1
BPS-eng : 448000
DURATION-eng : 00:21:35.072000000
NUMBER_OF_FRAMES-eng: 40471
NUMBER_OF_BYTES-eng: 72524032
SOURCE_ID-eng : 0180BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(eng), 0, 1/1000: Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
BPS-eng : 9903
DURATION-eng : 00:21:25.012955555
NUMBER_OF_FRAMES-eng: 472
NUMBER_OF_BYTES-eng: 1590772
SOURCE_ID-eng : 0120BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Successfully opened the file.
[Parsed_scale_0 @ 0x55c3bb6e1a00] Setting 'w' to value '720x480'
[Parsed_scale_0 @ 0x55c3bb6e1a00] w:720 h:480 flags:'bilinear' interl:0
[Parsed_format_1 @ 0x55c3bb6cf700] Setting 'pix_fmts' to value 'nv12|vaapi'
[Parsed_scale_vaapi_3 @ 0x55c3bb693d00] Setting 'format' to value 'nv12'
[Parsed_format_6 @ 0x55c3bb6d0c80] Setting 'pix_fmts' to value 'nv12'
Parsing a group of options: output url /var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0.m3u8.
Applying option map_metadata (set metadata information of outfile from infile) with argument -1.
Applying option map_chapters (set chapters mapping) with argument -1.
Applying option map (set input stream mapping) with argument 0:0.
Applying option map (set input stream mapping) with argument 0:1.
Applying option codec:v:0 (codec name) with argument h264_vaapi.
Applying option b:v (video bitrate (please use -b:v)) with argument 5961747.
Applying option profile:v:0 (set profile) with argument high.
Applying option force_key_frames:0 (force key frames at specified timestamps) with argument expr:gte(t,0+n_forced
3).
Applying option codec:a:0 (codec name) with argument aac.
Applying option ac (set number of audio channels) with argument 6.
Applying option ab (audio bitrate (please use -b:a)) with argument 640000.
Applying option max_muxing_queue_size (maximum number of packets that can be buffered while waiting for all streams to initialize) with argument 2048.
Applying option f (force format) with argument hls.
Successfully parsed a group of options.
Opening an output file: /var/lib/jellyfin/transcodes/02e7e26b23f4efc1b48b2d8ce43822d0.m3u8.
Successfully opened the file.
detected 4 logical cores
[dvdsub @ 0x55c3bb697c00] palette: 0x0000e1 0xe83f07 0x000000 0xfdfdfd 0xe9ebc2 0xd53a07 0xfaff1a 0x095d76 0x7c7c7c 0xe0e0e0 0x701f03 0x077307 0x00006c 0xcc0ae9 0xd2ab0f 0x730972
Stream mapping:
Stream #0:0 (mpeg2video) -> format (graph 0)
Stream #0:2 (dvdsub) -> scale (graph 0)
hwupload (graph 0) -> Stream #0:0 (h264_vaapi)
Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[mpeg2video @ 0x55c3bb696f40] Format vaapi_vld chosen by get_format().
[mpeg2video @ 0x55c3bb696f40] Format vaapi_vld requires hwaccel initialisation.
[mpeg2video @ 0x55c3bb696f40] Considering format 0x3231564e -> nv12.
[mpeg2video @ 0x55c3bb696f40] Picked nv12 (0x3231564e) as best match for yuv420p.
[AVHWFramesContext @ 0x55c3bb6d32c0] Created surface 0x4000000.
[AVHWFramesContext @ 0x55c3bb6d32c0] Direct mapping disabled: derived image format 3231564e does not match expected format 32315659.
[AVHWFramesContext @ 0x55c3bb6d32c0] Created surface 0x4000001.
[AVHWFramesContext @ 0x55c3bb6d32c0] Created surface 0x4000002.
[AVHWFramesContext @ 0x55c3bb6d32c0] Created surface 0x4000003.
[AVHWFramesContext @ 0x55c3bb6d32c0] Created surface 0x4000004.
[AVHWFramesContext @ 0x55c3bb6d32c0] Created surface 0x4000005.
[mpeg2video @ 0x55c3bb696f40] Considering format 0x3231564e -> nv12.
[mpeg2video @ 0x55c3bb696f40] Picked nv12 (0x3231564e) as best match for yuv420p.
[mpeg2video @ 0x55c3bb696f40] Decode context initialised: 0x1000000/0x2000000.
[mpeg2video @ 0x55c3bb696f40] Param buffer (type 0, 40 bytes) is 0x8000000.
[mpeg2video @ 0x55c3bb696f40] Param buffer (type 1, 288 bytes) is 0x8000001.
[mpeg2video @ 0x55c3bb696f40] Slice 0 param buffer (48 bytes) is 0x8000002.
[mpeg2video @ 0x55c3bb696f40] Slice 0 data buffer (243 bytes) is 0x8000003.
[mpeg2video @ 0x55c3bb696f40] Slice 1 param buffer (48 bytes) is 0x8000004.
[mpeg2video @ 0x55c3bb696f40] Slice 1 data buffer (243 bytes) is 0x8000005.
[mpeg2video @ 0x55c3bb696f40] Slice 2 param buffer (48 bytes) is 0x8000006.
[mpeg2video @ 0x55c3bb696f40] Slice 2 data buffer (243 bytes) is 0x8000007.
[mpeg2video @ 0x55c3bb696f40] Slice 3 param buffer (48 bytes) is 0x8000008.
[mpeg2video @ 0x55c3bb696f40] Slice 3 data buffer (243 bytes) is 0x8000009.
[mpeg2video @ 0x55c3bb696f40] Slice 4 param buffer (48 bytes) is 0x800000a.
[mpeg2video @ 0x55c3bb696f40] Slice 4 data buffer (243 bytes) is 0x800000b.
[mpeg2video @ 0x55c3bb696f40] Slice 5 param buffer (48 bytes) is 0x800000c.
[mpeg2video @ 0x55c3bb696f40] Slice 5 data buffer (243 bytes) is 0x800000d.
[mpeg2video @ 0x55c3bb696f40] Slice 6 param buffer (48 bytes) is 0x800000e.
[mpeg2video @ 0x55c3bb696f40] Slice 6 data buffer (243 bytes) is 0x800000f.
[mpeg2video @ 0x55c3bb696f40] Slice 7 param buffer (48 bytes) is 0x8000010.
[mpeg2video @ 0x55c3bb696f40] Slice 7 data buffer (243 bytes) is 0x8000011.
[mpeg2video @ 0x55c3bb696f40] Slice 8 param buffer (48 bytes) is 0x8000012.
[mpeg2video @ 0x55c3bb696f40] Slice 8 data buffer (243 bytes) is 0x8000013.
[mpeg2video @ 0x55c3bb696f40] Slice 9 param buffer (48 bytes) is 0x8000014.
[mpeg2video @ 0x55c3bb696f40] Slice 9 data buffer (243 bytes) is 0x8000015.
[mpeg2video @ 0x55c3bb696f40] Slice 10 param buffer (48 bytes) is 0x8000016.
[mpeg2video @ 0x55c3bb696f40] Slice 10 data buffer (243 bytes) is 0x8000017.
[mpeg2video @ 0x55c3bb696f40] Slice 11 param buffer (48 bytes) is 0x8000018.
[mpeg2video @ 0x55c3bb696f40] Slice 11 data buffer (243 bytes) is 0x8000019.
[mpeg2video @ 0x55c3bb696f40] Slice 12 param buffer (48 bytes) is 0x800001a.
[mpeg2video @ 0x55c3bb696f40] Slice 12 data buffer (243 bytes) is 0x800001b.
[mpeg2video @ 0x55c3bb696f40] Slice 13 param buffer (48 bytes) is 0x800001c.
[mpeg2video @ 0x55c3bb696f40] Slice 13 data buffer (243 bytes) is 0x800001d.
[mpeg2video @ 0x55c3bb696f40] Slice 14 param buffer (48 bytes) is 0x800001e.
[mpeg2video @ 0x55c3bb696f40] Slice 14 data buffer (243 bytes) is 0x800001f.
[mpeg2video @ 0x55c3bb696f40] Slice 15 param buffer (48 bytes) is 0x8000020.
[mpeg2video @ 0x55c3bb696f40] Slice 15 data buffer (243 bytes) is 0x8000021.
[mpeg2video @ 0x55c3bb696f40] Slice 16 param buffer (48 bytes) is 0x8000022.
[mpeg2video @ 0x55c3bb696f40] Slice 16 data buffer (243 bytes) is 0x8000023.
[mpeg2video @ 0x55c3bb696f40] Slice 17 param buffer (48 bytes) is 0x8000024.
[mpeg2video @ 0x55c3bb696f40] Slice 17 data buffer (243 bytes) is 0x8000025.
[mpeg2video @ 0x55c3bb696f40] Slice 18 param buffer (48 bytes) is 0x8000026.
[mpeg2video @ 0x55c3bb696f40] Slice 18 data buffer (243 bytes) is 0x8000027.
[mpeg2video @ 0x55c3bb696f40] Slice 19 param buffer (48 bytes) is 0x8000028.
[mpeg2video @ 0x55c3bb696f40] Slice 19 data buffer (243 bytes) is 0x8000029.
[mpeg2video @ 0x55c3bb696f40] Slice 20 param buffer (48 bytes) is 0x800002a.
[mpeg2video @ 0x55c3bb696f40] Slice 20 data buffer (243 bytes) is 0x800002b.
[mpeg2video @ 0x55c3bb696f40] Slice 21 param buffer (48 bytes) is 0x800002c.
[mpeg2video @ 0x55c3bb696f40] Slice 21 data buffer (243 bytes) is 0x800002d.
[mpeg2video @ 0x55c3bb696f40] Slice 22 param buffer (48 bytes) is 0x800002e.
[mpeg2video @ 0x55c3bb696f40] Slice 22 data buffer (243 bytes) is 0x800002f.
[mpeg2video @ 0x55c3bb696f40] Slice 23 param buffer (48 bytes) is 0x8000030.
[mpeg2video @ 0x55c3bb696f40] Slice 23 data buffer (243 bytes) is 0x8000031.
[mpeg2video @ 0x55c3bb696f40] Slice 24 param buffer (48 bytes) is 0x8000032.
[mpeg2video @ 0x55c3bb696f40] Slice 24 data buffer (243 bytes) is 0x8000033.
[mpeg2video @ 0x55c3bb696f40] Slice 25 param buffer (48 bytes) is 0x8000034.
[mpeg2video @ 0x55c3bb696f40] Slice 25 data buffer (243 bytes) is 0x8000035.
[mpeg2video @ 0x55c3bb696f40] Slice 26 param buffer (48 bytes) is 0x8000036.
[mpeg2video @ 0x55c3bb696f40] Slice 26 data buffer (243 bytes) is 0x8000037.
[mpeg2video @ 0x55c3bb696f40] Slice 27 param buffer (48 bytes) is 0x8000038.
[mpeg2video @ 0x55c3bb696f40] Slice 27 data buffer (243 bytes) is 0x8000039.
[mpeg2video @ 0x55c3bb696f40] Slice 28 param buffer (48 bytes) is 0x800003a.
[mpeg2video @ 0x55c3bb696f40] Slice 28 data buffer (243 bytes) is 0x800003b.
[mpeg2video @ 0x55c3bb696f40] Slice 29 param buffer (48 bytes) is 0x800003c.
[mpeg2video @ 0x55c3bb696f40] Slice 29 data buffer (113867 bytes) is 0x800003d.
[mpeg2video @ 0x55c3bb696f40] Decode to surface 0x4000005.
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[graph_1_in_0_1 @ 0x55c3bb6b7140] Setting 'time_base' to value '1/48000'
[graph_1_in_0_1 @ 0x55c3bb6b7140] Setting 'sample_rate' to value '48000'
[graph_1_in_0_1 @ 0x55c3bb6b7140] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x55c3bb6b7140] Setting 'channel_layout' to value '0x60f'
[graph_1_in_0_1 @ 0x55c3bb6b7140] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f
[format_out_0_1 @ 0x55c3bb6b7740] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x55c3bb6b7740] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[format_out_0_1 @ 0x55c3bb6b7740] Setting 'channel_layouts' to value '0x3f'
[format_out_0_1 @ 0x55c3bb6b7740] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[AVFilterGraph @ 0x55c3bb6b5d40] query_formats: 4 queried, 7 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] Using fltp internally between filters
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] Matrix coefficients:
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] FL: FL:1.000000 FR:0.000000 FC:0.000000 LFE:0.000000 SL:0.000000 SR:0.000000
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] FR: FL:0.000000 FR:1.000000 FC:0.000000 LFE:0.000000 SL:0.000000 SR:0.000000
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] FC: FL:0.000000 FR:0.000000 FC:1.000000 LFE:0.000000 SL:0.000000 SR:0.000000
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] LFE: FL:0.000000 FR:0.000000 FC:0.000000 LFE:1.000000 SL:0.000000 SR:0.000000
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] BL: FL:0.000000 FR:0.000000 FC:0.000000 LFE:0.000000 SL:1.000000 SR:0.000000
[auto_resampler_0 @ 0x55c3bb6b8d40] [SWR @ 0x55c3bb74b600] BR: FL:0.000000 FR:0.000000 FC:0.000000 LFE:0.000000 SL:0.000000 SR:1.000000
[auto_resampler_0 @ 0x55c3bb6b8d40] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:6 chl:5.1 fmt:fltp r:48000Hz
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[mpeg2video @ 0x55c3bb696f40] Param buffer (type 0, 40 bytes) is 0x800003d.
[mpeg2video @ 0x55c3bb696f40] Param buffer (type 1, 288 bytes) is 0x800003c.
[mpeg2video @ 0x55c3bb696f40] Slice 0 param buffer (48 bytes) is 0x800003b.
[mpeg2video @ 0x55c3bb696f40] Slice 0 data buffer (9 bytes) is 0x800003a.
[mpeg2video @ 0x55c3bb696f40] Slice 1 param buffer (48 bytes) is 0x8000039.
[mpeg2video @ 0x55c3bb696f40] Slice 1 data buffer (9 bytes) is 0x8000038.
[mpeg2video @ 0x55c3bb696f40] Slice 2 param buffer (48 bytes) is 0x8000037.
[mpeg2video @ 0x55c3bb696f40] Slice 2 data buffer (9 bytes) is 0x8000036.
[mpeg2video @ 0x55c3bb696f40] Slice 3 param buffer (48 bytes) is 0x8000035.
[mpeg2video @ 0x55c3bb696f40] Slice 3 data buffer (9 bytes) is 0x8000034.
[mpeg2video @ 0x55c3bb696f40] Slice 4 param buffer (48 bytes) is 0x8000033.
[mpeg2video @ 0x55c3bb696f40] Slice 4 data buffer (9 bytes) is 0x8000032.
[mpeg2video @ 0x55c3bb696f40] Slice 5 param buffer (48 bytes) is 0x8000031.
[mpeg2video @ 0x55c3bb696f40] Slice 5 data buffer (9 bytes) is 0x8000030.
[mpeg2video @ 0x55c3bb696f40] Slice 6 param buffer (48 bytes) is 0x800002f.
[mpeg2video @ 0x55c3bb696f40] Slice 6 data buffer (9 bytes) is 0x800002e.
[mpeg2video @ 0x55c3bb696f40] Slice 7 param buffer (48 bytes) is 0x800002d.
[mpeg2video @ 0x55c3bb696f40] Slice 7 data buffer (9 bytes) is 0x800002c.
[mpeg2video @ 0x55c3bb696f40] Slice 8 param buffer (48 bytes) is 0x800002b.
[mpeg2video @ 0x55c3bb696f40] Slice 8 data buffer (9 bytes) is 0x800002a.
[mpeg2video @ 0x55c3bb696f40] Slice 9 param buffer (48 bytes) is 0x8000029.
[mpeg2video @ 0x55c3bb696f40] Slice 9 data buffer (9 bytes) is 0x8000028.
[mpeg2video @ 0x55c3bb696f40] Slice 10 param buffer (48 bytes) is 0x8000027.
[mpeg2video @ 0x55c3bb696f40] Slice 10 data buffer (9 bytes) is 0x8000026.
[mpeg2video @ 0x55c3bb696f40] Slice 11 param buffer (48 bytes) is 0x8000025.
[mpeg2video @ 0x55c3bb696f40] Slice 11 data buffer (9 bytes) is 0x8000024.
[mpeg2video @ 0x55c3bb696f40] Slice 12 param buffer (48 bytes) is 0x8000023.
[mpeg2video @ 0x55c3bb696f40] Slice 12 data buffer (9 bytes) is 0x8000022.
[mpeg2video @ 0x55c3bb696f40] Slice 13 param buffer (48 bytes) is 0x8000021.
[mpeg2video @ 0x55c3bb696f40] Slice 13 data buffer (9 bytes) is 0x8000020.
[mpeg2video @ 0x55c3bb696f40] Slice 14 param buffer (48 bytes) is 0x800001f.
[mpeg2video @ 0x55c3bb696f40] Slice 14 data buffer (9 bytes) is 0x800001e.
[mpeg2video @ 0x55c3bb696f40] Slice 15 param buffer (48 bytes) is 0x800001d.
[mpeg2video @ 0x55c3bb696f40] Slice 15 data buffer (9 bytes) is 0x800001c.
[mpeg2video @ 0x55c3bb696f40] Slice 16 param buffer (48 bytes) is 0x800001b.
[mpeg2video @ 0x55c3bb696f40] Slice 16 data buffer (9 bytes) is 0x800001a.
[mpeg2video @ 0x55c3bb696f40] Slice 17 param buffer (48 bytes) is 0x8000019.
[mpeg2video @ 0x55c3bb696f40] Slice 17 data buffer (9 bytes) is 0x8000018.
[mpeg2video @ 0x55c3bb696f40] Slice 18 param buffer (48 bytes) is 0x8000017.
[mpeg2video @ 0x55c3bb696f40] Slice 18 data buffer (9 bytes) is 0x8000016.
[mpeg2video @ 0x55c3bb696f40] Slice 19 param buffer (48 bytes) is 0x8000015.
[mpeg2video @ 0x55c3bb696f40] Slice 19 data buffer (9 bytes) is 0x8000014.
[mpeg2video @ 0x55c3bb696f40] Slice 20 param buffer (48 bytes) is 0x8000013.
[mpeg2video @ 0x55c3bb696f40] Slice 20 data buffer (9 bytes) is 0x8000012.
[mpeg2video @ 0x55c3bb696f40] Slice 21 param buffer (48 bytes) is 0x8000011.
[mpeg2video @ 0x55c3bb696f40] Slice 21 data buffer (9 bytes) is 0x8000010.
[mpeg2video @ 0x55c3bb696f40] Slice 22 param buffer (48 bytes) is 0x800000f.
[mpeg2video @ 0x55c3bb696f40] Slice 22 data buffer (9 bytes) is 0x800000e.
[mpeg2video @ 0x55c3bb696f40] Slice 23 param buffer (48 bytes) is 0x800000d.
[mpeg2video @ 0x55c3bb696f40] Slice 23 data buffer (9 bytes) is 0x800000c.
[mpeg2video @ 0x55c3bb696f40] Slice 24 param buffer (48 bytes) is 0x800000b.
[mpeg2video @ 0x55c3bb696f40] Slice 24 data buffer (9 bytes) is 0x800000a.
[mpeg2video @ 0x55c3bb696f40] Slice 25 param buffer (48 bytes) is 0x8000009.
[mpeg2video @ 0x55c3bb696f40] Slice 25 data buffer (9 bytes) is 0x8000008.
[mpeg2video @ 0x55c3bb696f40] Slice 26 param buffer (48 bytes) is 0x8000007.
[mpeg2video @ 0x55c3bb696f40] Slice 26 data buffer (9 bytes) is 0x8000006.
[mpeg2video @ 0x55c3bb696f40] Slice 27 param buffer (48 bytes) is 0x8000005.
[mpeg2video @ 0x55c3bb696f40] Slice 27 data buffer (9 bytes) is 0x8000004.
[mpeg2video @ 0x55c3bb696f40] Slice 28 param buffer (48 bytes) is 0x8000003.
[mpeg2video @ 0x55c3bb696f40] Slice 28 data buffer (9 bytes) is 0x8000002.
[mpeg2video @ 0x55c3bb696f40] Slice 29 param buffer (48 bytes) is 0x8000001.
[mpeg2video @ 0x55c3bb696f40] Slice 29 data buffer (9 bytes) is 0x8000000.
[mpeg2video @ 0x55c3bb696f40] Decode to surface 0x4000004.
[Parsed_scale_0 @ 0x55c3bb7e0500] Setting 'w' to value '720x480'
[Parsed_scale_0 @ 0x55c3bb7e0500] w:720 h:480 flags:'bilinear' interl:0
[Parsed_format_1 @ 0x55c3bb7e1640] Setting 'pix_fmts' to value 'nv12|vaapi'
[Parsed_scale_vaapi_3 @ 0x55c3bb7e2640] Setting 'format' to value 'nv12'
[Parsed_format_6 @ 0x55c3bb7e4640] Setting 'pix_fmts' to value 'nv12'
[matroska,webm @ 0x55c3bb67f8c0] sub2video: using 720x480 canvas
[graph 0 input from stream 0:2 @ 0x55c3bb7e5fc0] Setting 'video_size' to value '720x480'
[graph 0 input from stream 0:2 @ 0x55c3bb7e5fc0] Setting 'pix_fmt' to value '28'
[graph 0 input from stream 0:2 @ 0x55c3bb7e5fc0] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:2 @ 0x55c3bb7e5fc0] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:2 @ 0x55c3bb7e5fc0] w:720 h:480 pixfmt:bgra tb:1/1000 fr:0/1 sar:0/1
[graph 0 input from stream 0:0 @ 0x55c3bb7e6c00] Setting 'video_size' to value '720x480'
[graph 0 input from stream 0:0 @ 0x55c3bb7e6c00] Setting 'pix_fmt' to value '46'
[graph 0 input from stream 0:0 @ 0x55c3bb7e6c00] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:0 @ 0x55c3bb7e6c00] Setting 'pixel_aspect' to value '186/157'
[graph 0 input from stream 0:0 @ 0x55c3bb7e6c00] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0x55c3bb7e6c00] w:720 h:480 pixfmt:vaapi_vld tb:1/1000 fr:30000/1001 sar:186/157
[format @ 0x55c3bb7e4f00] Setting 'pix_fmts' to value 'vaapi_vld'
[AVFilterGraph @ 0x55c3bb7c57c0] query_formats: 12 queried, 11 merged, 0 already done, 0 delayed
[AVHWFramesContext @ 0x55c3bb7ea080] Created surface 0x4000006.
[AVHWFramesContext @ 0x55c3bb7ea080] Direct mapping possible.
[AVHWFramesContext @ 0x55c3bb7ea080] Created surface 0x4000007.
[AVHWFramesContext @ 0x55c3bb7ea080] Created surface 0x4000008.
[AVHWFramesContext @ 0x55c3bb7ea080] Created surface 0x4000009.
[AVHWFramesContext @ 0x55c3bb7ea080] Created surface 0x400000a.

@nyanmisaka
Copy link
Member

Can you see any errors in the end?

@zehnerGIT
Copy link
Author

zehnerGIT commented Mar 3, 2022

Does ffmpeg log errors to stderr? (with the above command stderr and stdout are logged)

I have to stop the execution with Ctrl+C, because after a minute the log file has already more than 50MB. But the last lines look similiar to the posted lines and no crash happened (that's why I have stopped it).

The last lines:
[mpeg2video @ 0x5655390e8f40] Slice 21 param buffer (48 bytes) is 0x8000010.
[mpeg2video @ 0x5655390e8f40] Slice 21 data buffer (6886 bytes) is 0x800000f.
[mpeg2video @ 0x5655390e8f40] Slice 22 param buffer (48 bytes) is 0x800000e.
[mpeg2video @ 0x5655390e8f40] Slice 22 data buffer (5232 bytes) is 0x800000d.
[mpeg2video @ 0x5655390e8f40] Slice 23 param buffer (48 bytes) is 0x800000c.
[mpeg2video @ 0x5655390e8f40] Slice 23 data buffer (4143 bytes) is 0x800000b.
[mpeg2video @ 0x5655390e8f40] Slice 24 param buffer (48 bytes) is 0x8000040.
[mpeg2video @ 0x5655390e8f40] Slice 24 data buffer (3328 bytes) is 0x800003f.
[mpeg2video @ 0x5655390e8f40] Slice 25 param buffer (48 bytes) is 0x800003e.
[mpeg2video @ 0x5655390e8f40] Slice 25 data buffer (3219 bytes) is 0x8000000.
[mpeg2video @ 0x5655390e8f40] Slice 26 param buffer (48 bytes) is 0x8000001.
[mpeg2video @ 0x5655390e8f40] Slice 26 data buffer (3094 bytes) is 0x800000a.
[mpeg2video @ 0x5655390e8f40] Slice 27 param buffer (48 bytes) is 0x8000008.
[mpeg2video @ 0x5655390e8f40] Slice 27 data buffer (3311 bytes) is 0x8000007.
[mpeg2video @ 0x5655390e8f40] Slice 28 param buffer (48 bytes) is 0x8000006.
[mpeg2video @ 0x5655390e8f40] Slice 28 data buffer (3155 bytes) is 0x8000005.
[mpeg2video @ 0x5655390e8f40] Slice 29 param buffer (48 bytes) is 0x8000004.
[mpeg2video @ 0x5655390e8f40] Slice 29 data buffer (8032 bytes) is 0x8000003.
[mpeg2video @ 0x5655390e8f40] Decode to surface 0x4000004.
[Parsed_scale_vaapi_3 @ 0x565539234640] Filter input: vaapi_vld, 720x480 (140140).
[Parsed_scale_vaapi_3 @ 0x565539234640] Mapped colour properties tv unknown/unknown/unknown left to VA standard 0 chroma siting 0x6 range 0x1.
Last message repeated 1 times
[Parsed_scale_vaapi_3 @ 0x565539234640] Pipeline parameter buffer is 0x8000003.
[Parsed_scale_vaapi_3 @ 0x565539234640] Filter output: vaapi_vld, 720x480 (140140), mode: HQ.
[AVHWFramesContext @ 0x56553923c080] Map surface 0x400000f.
[AVHWFramesContext @ 0x56553923c080] Unmap surface 0x400000f.
[Parsed_overlay_5 @ 0x565539235a80] n:3361.000000 t:140.140000 pos:102115552.000000 x:0.000000 xi:0 y:0.000000 yi:0
[AVHWFramesContext @ 0x56553923e780] Map surface 0x4000015.
[AVHWFramesContext @ 0x56553923e780] Unmap surface 0x4000015.
[mpeg2video @ 0x5655390e8f40] Param buffer (type 0, 40 bytes) is 0x8000003.
[mpeg2video @ 0x5655390e8f40] Param buffer (type 1, 288 bytes) is 0x8000004.
[mpeg2video @ 0x5655390e8f40] Slice 0 param buffer (48 bytes) is 0x8000005.
[mpeg2video @ 0x5655390e8f40] Slice 0 data buffer (508 bytes) is 0x8000006.
[mpeg2video @ 0x5655390e8f40] Slice 1 param buffer (48 bytes) is 0x8000007.
[mpeg2video @ 0x5655390e8f40] Slice 1 data buffer (527 bytes) is 0x8000008.
[mpeg2video @ 0x5655390e8f40] Slice 2 param buffer (48 bytes) is 0x800000a.
[mpeg2video @ 0x5655390e8f40] Slice 2 data buffer (564 bytes) is 0x8000001.
[mpeg2video @ 0x5655390e8f40] Slice 3 param buffer (48 bytes) is 0x8000000.
[mpeg2video @ 0x5655390e8f40] Slice 3 data buffer (559 bytes) is 0x800003e.
[mpeg2video @ 0x5655390e8f40] Slice 4 param buffer (48 bytes) is 0x800003f.
[mpeg2video @ 0x5655390e8f40] Slice 4 data buffer (676 bytes) is 0x8000040.
[mpeg2video @ 0x5655390e8f40] Slice 5 param buffer (48 bytes) is 0x800000b.
[mpeg2video @ 0x5655390e8f40] Slice 5 data buffer (580 bytes) is 0x800000c.
[mpeg2video @ 0x5655390e8f40] Slice 6 param buffer (48 bytes) is 0x800000d.
[mpeg2video @ 0x5655390e8f40] Slice 6 data buffer (630 bytes) is 0x800000e.
[mpeg2video @ 0x5655390e8f40] Slice 7 param buffer (48 bytes) is 0x800000f.
[mpeg2video @ 0x5655390e8f40] Slice 7 data buffer (680 bytes) is 0x8000010.
[mpeg2video @ 0x5655390e8f40] Slice 8 param buffer (48 bytes) is 0x8000011.
[mpeg2video @ 0x5655390e8f40] Slice 8 data buffer (736 bytes) is 0x8000012.
[mpeg2video @ 0x5655390e8f40] Slice 9 param buffer (48 bytes) is 0x8000013.
[mpeg2video @ 0x5655390e8f40] Slice 9 data buffer (691 bytes) is 0x8000014.
[mpeg2video @ 0x5655390e8f40] Slice 10 param buffer (48 bytes) is 0x8000015.
[mpeg2video @ 0x5655390e8f40] Slice 10 data buffer (753 bytes) is 0x8000016.
[mpeg2video @ 0x5655390e8f40] Slice 11 param buffer (48 bytes) is 0x8000017.
[mpeg2video @ 0x5655390e8f40] Slice 11 data buffer (805 bytes) is 0x8000018.
[mpeg2video @ 0x5655390e8f40] Slice 12 param buffer (48 bytes) is 0x8000019.
[mpeg2video @ 0x5655390e8f40] Slice 12 data buffer (862 bytes) is 0x800001a.
[mpeg2video @ 0x5655390e8f40] Slice 13 param buffer (48 bytes) is 0x800001b.
[mpeg2video @ 0x5655390e8f40] Slice 13 data buffer (810 bytes) is 0x800001c.
[mpeg2video @ 0x5655390e8f40] Slice 14 param buffer (48 bytes) is 0x800001d.
[mpeg2video @ 0x5655390e8f40] Slice 14 data buffer (765 bytes) is 0x800001e.
[mpeg2video @ 0x5655390e8f40] Slice 15 param buffer (48 bytes) is 0x800001f.
[mpeg2video @ 0x5655390e8f40] Slice 15 data buffer (825 bytes) is 0x8000020.
[mpeg2video @ 0x5655390e8f40] Slice 16 param buffer (48 bytes) is 0x8000021.
[mpeg2video @ 0x5655390e8f40] Slice 16 data buffer (1249 bytes) is 0x8000022.
[mpeg2video @ 0x5655390e8f40] Slice 17 param buffer (48 bytes) is 0x8000023.
[mpeg2video @ 0x5655390e8f40] Slice 17 data buffer (1029 bytes) is 0x8000024.
[mpeg2video @ 0x5655390e8f40] Slice 18 param buffer (48 bytes) is 0x8000025.
[mpeg2video @ 0x5655390e8f40] Slice 18 data buffer (883 bytes) is 0x8000026.
[mpeg2video @ 0x5655390e8f40] Slice 19 param buffer (48 bytes) is 0x8000027.
[mpeg2video @ 0x5655390e8f40] Slice 19 data buffer (846 bytes) is 0x8000028.
[mpeg2video @ 0x5655390e8f40] Slice 20 param buffer (48 bytes) is 0x8000029.
[mpeg2video @ 0x5655390e8f40] Slice 20 data buffer (1012 bytes) is 0x800002a.
[mpeg2video @ 0x5655390e8f40] Slice 21 param buffer (48 bytes) is 0x800002b.
[mpeg2video @ 0x5655390e8f40] Slice 21 data buffer (905 bytes) is 0x800002c.
[mpeg2video @ 0x5655390e8f40] Slice 22 param buffer (48 bytes) is 0x800002d.
[mpeg2video @ 0x5655390e8f40] Slice 22 data buffer (580 bytes) is 0x800002e.
[mpeg2video @ 0x5655390e8f40] Slice 23 param buffer (48 bytes) is 0x800002f.
[mpeg2video @ 0x5655390e8f40] Slice 23 data buffer (441 bytes) is 0x8000035.
[mpeg2video @ 0x5655390e8f40] Slice 24 param buffer (48 bytes) is 0x8000034.
[mpeg2video @ 0x5655390e8f40] Slice 24 data buffer (380 bytes) is 0x8000033.
[mpeg2video @ 0x5655390e8f40] Slice 25 param buffer (48 bytes) is 0x8000032.
[mpeg2video @ 0x5655390e8f40] Slice 25 data buffer (385 bytes) is 0x8000031.
[mpeg2video @ 0x5655390e8f40] Slice 26 param buffer (48 bytes) is 0x8000041.
[mpeg2video @ 0x5655390e8f40] Slice 26 data buffer (362 bytes) is 0x8000030.
[mpeg2video @ 0x5655390e8f40] Slice 27 param buffer (48 bytes) is 0x800003c.
[mpeg2video @ 0x5655390e8f40] Slice 27 data buffer (357 bytes) is 0x800003b.
[mpeg2video @ 0x5655390e8f40] Slice 28 param buffer (48 bytes) is 0x800003a.
[mpeg2video @ 0x5655390e8f40] Slice 28 data buffer (320 bytes) is 0x8000039.
[mpeg2video @ 0x5655390e8f40] Slice 29 param buffer (48 bytes) is 0x8000038.
[mpeg2video @ 0x5655390e8f40] Slice 29 data buffer (5430 bytes) is 0x8000042.
[mpeg2video @ 0x5655390e8f40] Decode to surface 0x4000003.
[Parsed_scale_vaapi_3 @ 0x565539234640] Filter input: vaapi_vld, 720x480 (140173).
[Parsed_scale_vaapi_3 @ 0x565539234640] Mapped colour properties tv unknown/unknown/unknown left to VA standard 0 chroma siting 0x6 range 0x1.
Last message repeated 1 times
[Parsed_scale_vaapi_3 @ 0x565539234640] Pipeline parameter buffer is 0x8000042.
[Parsed_scale_vaapi_3 @ 0x565539234640] Filter output: vaapi_vld, 720x480 (140173), mode: HQ.
[AVHWFramesContext @ 0x56553923c080] Map surface 0x400000f.
[AVHWFramesContext @ 0x56553923c080] Unmap surface 0x400000f.
[h264_vaapi @ 0x565539135fc0] Input frame: 720x480 (4200).
[h264_vaapi @ 0x565539135fc0] Pick nothing to encode next - need more input for reference pictures.
[h264_vaapi @ 0x565539135fc0] Sync to pic 4195/4196 (input surface 0x4000010).
[h264_vaapi @ 0x565539135fc0] Output buffer: 17553 bytes (status 00000000).
[h264_vaapi @ 0x565539135fc0] Output read for pic 4195/4196.
[h264_vaapi @ 0x565539135fc0] Output packet: pts 4195 dts 4195.

@nyanmisaka
Copy link
Member

It seems to be working fine with those so many lines of debug log.

Can you set a new ENV to force enable i965 driver for jellyfin-ffmpeg?
export LIBVA_DRIVER_NAME_JELLYFIN=i965

@zehnerGIT
Copy link
Author

zehnerGIT commented Mar 3, 2022

Sorry, but I don't know how to add environment variables to users without a shell?

If I add
LIBVA_DRIVER_NAME_JELLYFIN=i965
to /etc/environment I get i965 with echo $LIBVA_DRIVER_NAME_JELLYFIN after
su -s /bin/bash jellyfin
so it seems to be working with a shell, but playback of the web-client still fails. So either the environment variable is not used for the web-playback or it doesn't work

/videos/484a0660-9410-1215-f29e-634152c78a4c/hls1/main/0.ts

{"Protocol":0,"Id":"484a066094101215f29e634152c78a4c","Path":"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":965276992,"Name":"Brockmire-S01E03","IsRemote":false,"ETag":"4e96544892fd248818e76b500c90ff82","RunTimeTicks":12952939520,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"480p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5961747,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":480,"Width":720,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":null},{"Codec":"ac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Surround 5.1","VideoRange":null,"localizedUndefined":null,"localizedDefault":null,"localizedForced":null,"DisplayTitle":"Surround 5.1 - En - Dolby Digital - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":448000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"DVDSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"localizedUndefined":"Undefiniert","localizedDefault":"Standard","localizedForced":"Erzwungen","DisplayTitle":"En - Standard","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":6409747,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 h264_vaapi -b:v 5961747 -maxrate 5961747 -bufsize 11923494 -profile:v:0 high -level 41 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -filter_complex "[0:2]scale=720x480[sub];[0:0]format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,hwdownload[base];[base][sub]overlay,format=nv12,hwupload" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 640000 -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 "/var/lib/jellyfin/transcodes/3199c7647f366529f79a12453f731aef%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/3199c7647f366529f79a12453f731aef.m3u8"

ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVHWDeviceContext @ 0x560ed1a487c0] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
Input #0, matroska,webm, from 'file:/srv/shares/public/video/Serien/Brockmire/S01/Brockmire-S01E03.mkv':
Metadata:
encoder : libmakemkv v1.16.5 (1.3.10/1.5.2) x86_64-linux-gnu
creation_time : 2021-12-05T10:33:16.000000Z
Duration: 00:21:35.29, start: 0.000000, bitrate: 5961 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 452.952500
Metadata:
title : Chapter 01
Chapter #0:1: start 452.952500, end 605.104500
Metadata:
title : Chapter 02
Chapter #0:2: start 605.104500, end 967.299667
Metadata:
title : Chapter 03
Chapter #0:3: start 967.299667, end 1295.294000
Metadata:
title : Chapter 04
Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
BPS-eng : 5499130
DURATION-eng : 00:21:35.294000000
NUMBER_OF_FRAMES-eng: 31056
NUMBER_OF_BYTES-eng: 890373768
SOURCE_ID-eng : 0100E0
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Side data:
cpb: bitrate max/min/avg: 8500000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
title : Surround 5.1
BPS-eng : 448000
DURATION-eng : 00:21:35.072000000
NUMBER_OF_FRAMES-eng: 40471
NUMBER_OF_BYTES-eng: 72524032
SOURCE_ID-eng : 0180BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
BPS-eng : 9903
DURATION-eng : 00:21:25.012955555
NUMBER_OF_FRAMES-eng: 472
NUMBER_OF_BYTES-eng: 1590772
SOURCE_ID-eng : 0120BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2021-12-05 10:33:16
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream mapping:
Stream #0:0 (mpeg2video) -> format (graph 0)
Stream #0:2 (dvdsub) -> scale (graph 0)
hwupload (graph 0) -> Stream #0:0 (h264_vaapi)
Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x560ed1a65b00] sub2video: using 720x480 canvas
Output #0, hls, to '/var/lib/jellyfin/transcodes/3199c7647f366529f79a12453f731aef.m3u8':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (High), vaapi_vld(tv, progressive), 720x480 [SAR 186:157 DAR 279:157], q=2-31, 5961 kb/s, 29.97 fps, 90k tbn (default)
Metadata:
encoder : Lavc58.134.100 h264_vaapi
Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 640 kb/s (default)
Metadata:
encoder : Lavc58.134.100 aac
[h264_vaapi @ 0x560ed1a7c4c0] Failed to sync to output buffer completion: 5 (invalid VAContextID).
Video encoding failed
[h264_vaapi @ 0x560ed1a7c4c0] Failed to sync to output buffer completion: 5 (invalid VAContextID).
[aac @ 0x560ed1acefc0] Qavg: 65536.000
[aac @ 0x560ed1acefc0] 2 frames left in the queue on closing
Conversion failed!

@nyanmisaka
Copy link
Member

/etc/environment doesn't affect systemd services.

How about this? sudo systemctl set-environment LIBVA_DRIVER_NAME_JELLYFIN=i965

@zehnerGIT
Copy link
Author

Thank you. Sorry, sudo systemctl set-environment LIBVA_DRIVER_NAME_JELLYFIN=i965 doesn't work, playback still doesn't start.

Oddly enough, if I add Environment=LIBVA_DRIVER_NAME_JELLYFIN=i965 manually to /etc/systemd/system/jellyfin.service.d/jellyfin.service.conf, playback starts (after a reboot or reload of the daemon)

@Shadowghost
Copy link
Contributor

You should be able to add it to /etc/default/jellyfin too since that's the ENV loaded by default by the service.

@zehnerGIT
Copy link
Author

You should be able to add it to /etc/default/jellyfin too since that's the ENV loaded by default by the service.

You are right, adding LIBVA_DRIVER_NAME_JELLYFIN=i965 in the middle of the file also works.

Thanks to you both, guys 🥇.
In contrast to other projects, jellyfin's support helps the user instead of the usual recommendation "buy new hardware"

@Shadowghost
Copy link
Contributor

Glad it works now at least.

@nyanmisaka can we solve this within ffmpeg or do we require docs telling people to manually set that env var when requiring i965 driver?

@nyanmisaka
Copy link
Member

nyanmisaka commented Mar 4, 2022

The iHD driver is prior to i965 in libva's mapping table even if it's not supported by older intel iGPU, therefore it cannot do a fall back automatically.

I will add a check in jellyfin before initializing vaapi device to bypass this issue.

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

Successfully merging a pull request may close this issue.

3 participants