Jellyfin Forum
FFMPEG not transcoding MKV on Raspberry Pi 4 - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: FFMPEG not transcoding MKV on Raspberry Pi 4 (/t-ffmpeg-not-transcoding-mkv-on-raspberry-pi-4)



FFMPEG not transcoding MKV on Raspberry Pi 4 - DeltaGemini - 2023-06-19

Raspberry Pi 4
OpenMediaVault 6, Docker, lscr.io/linuxserver/jellyfin:latest

I'm having trouble playing MKV videos from my Raspberry Pi Jellyfin server to my Chromecast. I opened up the FFMPEG log and pasted it in. 

Is anyone able to identify the cause? I know the Pi isn't exactly powerful enough to transcode efficiently, but it seems there's an error preventing trying it at all.

Many thanks!



Code:
/videos/b3925e16-d248-4920-c563-74d6213e1253/stream.mkv

{"Protocol":0,"Id":"b3925e16d2484920c56374d6213e1253","Path":"/data/anime/Sample/Sample - 01 [BD 1080p HEVC x265 10bit Opus 5.1][Dual Audio].mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":319025376,"Name":"[QaS] Fullmetal Alchemist Brotherhood - 01 [BD 1080p HEVC x265 10bit Opus 5.1][Dual Audio]","IsRemote":false,"ETag":"4241ccff67a19de6e4a3aa4ea8f093e5","RunTimeTicks":14696410112,"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":"hevc","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":"bt709","ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","VideoRangeType":"SDR","VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"1080p HEVC SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":1736616,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":1080,"Width":1920,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main 10","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":null},{"Codec":"opus","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"English - OPUS - 5.1 - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":240085,"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":"opus","CodecTag":null,"Language":"jpn","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"Japanese - OPUS - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"stereo","BitRate":122572,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"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":"opus","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"English Commentary","VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"English Commentary - OPUS - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"stereo","BitRate":90867,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"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":"ass","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Signs/Songs","VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","DisplayTitle":"Signs/Songs - English - Default - Forced - ASS","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":true,"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":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"ass","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"English","VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","DisplayTitle":"English - ASS","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":5,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[{"Codec":"otf","CodecTag":"[0][0][0][0]","Comment":null,"Index":6,"FileName":"A-OTF-SHINMGOPRO-MEDIUM.otf","MimeType":"application/vnd.ms-opentype","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":7,"FileName":"Calligraphic-810-BT.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":8,"FileName":"DFPHSMincho-W9.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"otf","CodecTag":"[0][0][0][0]","Comment":null,"Index":9,"FileName":"Wunderlich-Medium.otf","MimeType":"application/vnd.ms-opentype","DeliveryUrl":null}],"Formats":[],"Bitrate":2190140,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -autorotate 0 -i file:"/data/anime/Sample/Sample - 01 [BD 1080p HEVC x265 10bit Opus 5.1][Dual Audio].mkv" -map 0:0 -map 0:1 -codec:v:0 h264_v4l2m2m -force_key_frames "expr:gte(t,n_forced*5)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/64)*64:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p,subtitles=f='/data/anime/Sample/Sample - 01 [BD 1080p HEVC x265 10bit Opus 5.1][Dual Audio].mkv':si=0:fontsdir='/config/cache/attachments/b3925e16d2484920c56374d6213e1253'" -copyts -avoid_negative_ts disabled -start_at_zero -b:v 4341540 -maxrate 4341540 -bufsize 8683080 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 libopus -ac 2 -ab 192000 -ar 48000 -af "volume=2" -y "/config/data/transcodes/ecae7126e03cd5841c879c3deb5f5b0b.mkv"


ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --toolchain=hardened --enable-cross-compile --arch=armhf --cross-prefix=/usr/bin/arm-linux-gnueabihf-
  libavutil      57. 28.100 / 57. 28.100
  libavcodec    59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter    8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample  4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, matroska,webm, from 'file:/data/anime/Sample/Sample - 01 [BD 1080p HEVC x265 10bit Opus 5.1][Dual Audio].mkv':
  Metadata:
    encoder        : libebml v1.4.2 + libmatroska v1.6.4
    creation_time  : 2021-04-06T14:51:34.000000Z
  Duration: 00:24:29.64, start: -0.007000, bitrate: 1736 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 58.809000
      Metadata:
        title          : Prologue
    Chapter #0:1: start 58.809000, end 148.774000
      Metadata:
        title          : OP
    Chapter #0:2: start 148.774000, end 655.154000
      Metadata:
        title          : Part A
    Chapter #0:3: start 655.154000, end 1347.137000
      Metadata:
        title          : Part B
    Chapter #0:4: start 1347.137000, end 1437.603000
      Metadata:
        title          : ED
    Chapter #0:5: start 1437.603000, end 1469.634000
      Metadata:
        title          : Preview
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709/unknown/unknown), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS-eng        : 1237060
      DURATION-eng    : 00:24:29.635000000
      NUMBER_OF_FRAMES-eng: 35236
      NUMBER_OF_BYTES-eng: 227253462
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-06 14:51:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: opus, 48000 Hz, 5.1, fltp (default)
    Metadata:
      ENCODER        : Lavc58.128.100 libopus
      BPS-eng        : 240085
      DURATION-eng    : 00:24:27.304000000
      NUMBER_OF_FRAMES-eng: 73366
      NUMBER_OF_BYTES-eng: 44034817
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-06 14:51:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(jpn): Audio: opus, 48000 Hz, stereo, fltp
    Metadata:
      ENCODER        : Lavc58.128.100 libopus
      BPS-eng        : 122572
      DURATION-eng    : 00:24:29.641000000
      NUMBER_OF_FRAMES-eng: 73483
      NUMBER_OF_BYTES-eng: 22517249
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-06 14:51:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Audio: opus, 48000 Hz, stereo, fltp
    Metadata:
      title          : English Commentary
      ENCODER        : Lavc58.128.100 libopus
      BPS-eng        : 90867
      DURATION-eng    : 00:24:28.615000000
      NUMBER_OF_FRAMES-eng: 73431
      NUMBER_OF_BYTES-eng: 16681123
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-06 14:51:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(eng): Subtitle: ass (default) (forced)
    Metadata:
      title          : Signs/Songs
      BPS-eng        : 36
      DURATION-eng    : 00:23:22.880000000
      NUMBER_OF_FRAMES-eng: 87
      NUMBER_OF_BYTES-eng: 6321
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-06 14:51:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5(eng): Subtitle: ass
    Metadata:
      title          : English
      BPS-eng        : 132
      DURATION-eng    : 00:24:15.800000000
      NUMBER_OF_FRAMES-eng: 393
      NUMBER_OF_BYTES-eng: 24189
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-06 14:51:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6: Attachment: otf
    Metadata:
      filename        : A-OTF-SHINMGOPRO-MEDIUM.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:7: Attachment: ttf
    Metadata:
      filename        : Calligraphic-810-BT.ttf
      mimetype        : application/x-truetype-font
  Stream #0:8: Attachment: ttf
    Metadata:
      filename        : DFPHSMincho-W9.ttf
      mimetype        : application/x-truetype-font
  Stream #0:9: Attachment: otf
    Metadata:
      filename        : Wunderlich-Medium.otf
      mimetype        : application/vnd.ms-opentype
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_v4l2m2m))
  Stream #0:1 -> #0:1 (opus (native) -> opus (libopus))
Press [q] to stop, [?] for help
[Parsed_subtitles_3 @ 0x1e73ba0] libass API version: 0x1502000
[Parsed_subtitles_3 @ 0x1e73ba0] libass source: tarball: 0.15.2
[Parsed_subtitles_3 @ 0x1e73ba0] Shaper: FriBidi 1.0.8 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
[Parsed_subtitles_3 @ 0x1e73ba0] Loading font file '/config/cache/attachments/b3925e16d2484920c56374d6213e1253/DFPHSMincho-W9.ttf'
[Parsed_subtitles_3 @ 0x1e73ba0] Loading font file '/config/cache/attachments/b3925e16d2484920c56374d6213e1253/Wunderlich-Medium.otf'
[Parsed_subtitles_3 @ 0x1e73ba0] Loading font file '/config/cache/attachments/b3925e16d2484920c56374d6213e1253/A-OTF-SHINMGOPRO-MEDIUM.otf'
[Parsed_subtitles_3 @ 0x1e73ba0] Loading font file '/config/cache/attachments/b3925e16d2484920c56374d6213e1253/Calligraphic-810-BT.ttf'
[Parsed_subtitles_3 @ 0x1e73ba0] Using font provider fontconfig
[h264_v4l2m2m @ 0x18b0da0] Using device /dev/video11
[h264_v4l2m2m @ 0x18b0da0] driver 'bcm2835-codec' on card 'bcm2835-codec-encode' in mplane mode
[h264_v4l2m2m @ 0x18b0da0] requesting formats: output=YU12 capture=H264
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Error initializing output stream 0:0 --
[libopus @ 0x18b1d50] 1 frames left in the queue on closing
Conversion failed!



RE: FFMPEG not transcoding MKV on Raspberry Pi 4 - Venson - 2023-06-19

Hey, 

there should also be a corresponding ffmpeg logfile, could you post that aswell?


RE: FFMPEG not transcoding MKV on Raspberry Pi 4 - sevenrats - 2023-06-19

this looks to me like a HWA misconfiguration. now way is RPi4 silicon decoding an HEVC main10


RE: FFMPEG not transcoding MKV on Raspberry Pi 4 - DeltaGemini - 2023-06-19

(2023-06-19, 02:32 PM)Venson Wrote: Hey, 

there should also be a corresponding ffmpeg logfile, could you post that aswell?

I pulled it from a FFmpeg.Transcode log file. Is there anything else I should get?

(2023-06-19, 03:39 PM)sevenrats Wrote: this looks to me like a HWA misconfiguration.  now way is RPi4 silicon decoding an HEVC main10

Do you mean it's not capable or that it shouldn't have to do it?


RE: FFMPEG not transcoding MKV on Raspberry Pi 4 - Venson - 2023-06-19

(2023-06-19, 05:59 PM)DeltaGemini Wrote:
(2023-06-19, 02:32 PM)Venson Wrote: Hey, 

there should also be a corresponding ffmpeg logfile, could you post that aswell?

I pulled it from a FFmpeg.Transcode log file. Is there anything else I should get?

(2023-06-19, 03:39 PM)sevenrats Wrote: this looks to me like a HWA misconfiguration.  now way is RPi4 silicon decoding an HEVC main10

Do you mean it's not capable or that it shouldn't have to do it?

You are absoluty right, forgot how to scroll :-D.
as seven said, support for RP hardware acceleration was partially dropped and is no longer fully supported after 10.8 see here:
[/url][url=https://jellyfin.org/docs/general/administration/hardware-acceleration/#raspberry-pi-v4l2]Hardware Acceleration | Jellyfin