Jellyfin Forum
Transcoding fails for MPEG1/MPEG2 videos with MP2 audio - 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: Transcoding fails for MPEG1/MPEG2 videos with MP2 audio (/t-transcoding-fails-for-mpeg1-mpeg2-videos-with-mp2-audio)



Transcoding fails for MPEG1/MPEG2 videos with MP2 audio - phoenix22 - 2024-06-09

Hello,
 
I am using Jellyfin 10.9.6 docker on a qnap NAS. Since the update to Jellyfin 10.9.X I am having problems to play some videos of mine.
 
Clients where the problem shows: Android, Android TV, Kodi with Jellycon, Firefox Browser
Videos with the problem: MPEG1 or MPEG 2 videos with mp2 audio
 
These videos were transcoded and played correctly until the update to Jellyfin 10.9.X

I am using no hardware acceleration.
 
A sample video
https://samples.ffmpeg.org/archive/extension/mpg/mpeg+mpeg2video+mp2++Nausicaa.mpg
 
results in the error
"Playback Error - Playback failed due to a fatal player error."
 
and the log entry
{"Protocol":0,"Id":"96175109e8cf2cb704bcda56d82efe23","Path":"/media/Video-Enc/Film-Andere/mpeg\u002Bmpeg2video\u002Bmp2\u002B\u002BNausicaa.mpeg","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"ts","Size":15000000,"Name":"mpeg\u002Bmpeg2video\u002Bmp2\u002B\u002BNausicaa","IsRemote":false,"ETag":"01120b426671b674f7c475ceffde5359","RunTimeTicks":662328220,"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":null,"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/90000","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"480i MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":true,"IsAVC":false,"ChannelLayout":null,"BitRate":2600000,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":480,"Width":480,"AverageFrameRate":29.97003,"RealFrameRate":29.97003,"Profile":"Main","Type":1,"AspectRatio":"4:3","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":8,"IsAnamorphic":false},{"Codec":"mp2","CodecTag":null,"Language":null,"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/90000","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"MP2 - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":"stereo","BitRate":128000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":44100,"IsDefault":false,"IsForced":false,"IsHearingImpaired":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}],"MediaAttachments":[],"Formats":[],"Bitrate":1811790,"Timestamp":0,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f mpegts -noautorotate -i file:"/media/Video-Enc/Film-Andere/mpeg+mpeg2video+mp2++Nausicaa.mpeg" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 5200000 -bufsize 10400000 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 "expr:gte(t,n_forced*3)" -sc_threshold:v:0 0 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,yadif=0Thumbs-down0,scale=trunc(min(max(iw\,ih*a)\,min(480\,480*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(480/a\,480))/2)*2,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "6bed102f5976b9b906636f3b245fe30e-1.mp4" -start_number 0 -hls_segment_filename "/config/transcodes/6bed102f5976b9b906636f3b245fe30e%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/6bed102f5976b9b906636f3b245fe30e.m3u8"


ffmpeg version 6.0.1-Jellyfin Copyright © 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --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-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[mpegts @ 0x55e38d2ce7c0] Could not detect TS packet size, defaulting to non-FEC/DVHS
[mpegts @ 0x55e38d2ce7c0] max resync size reached, could not find sync byte
    Last message repeated 1 times
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 188
...
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] PES packet size mismatch
[mpegts @ 0x55e38d2ce7c0] Packet corrupt (stream = 0, dts = NOPTS).
[mpegts @ 0x55e38d2ce7c0] PES packet size mismatch
[mpegts @ 0x55e38d2ce7c0] Packet corrupt (stream = 5, dts = NOPTS).
[mpegts @ 0x55e38d2ce7c0] PES packet size mismatch
[mpegts @ 0x55e38d2ce7c0] Packet corrupt (stream = 10, dts = 5188081214).
[mpegts @ 0x55e38d2ce7c0] probed stream 0 failed
[mpegts @ 0x55e38d2ce7c0] probed stream 1 failed
[mpegts @ 0x55e38d2ce7c0] probed stream 2 failed
[mpegts @ 0x55e38d2ce7c0] probed stream 3 failed
[mpegts @ 0x55e38d2ce7c0] nothing to probe for stream 4
[mpegts @ 0x55e38d2ce7c0] probed stream 4 failed
[mpegts @ 0x55e38d2ce7c0] probed stream 5 failed
[mpegts @ 0x55e38d2ce7c0] nothing to probe for stream 6
[mpegts @ 0x55e38d2ce7c0] probed stream 6 failed
[mpegts @ 0x55e38d2ce7c0] nothing to probe for stream 7
[mpegts @ 0x55e38d2ce7c0] probed stream 7 failed
[mpegts @ 0x55e38d2ce7c0] nothing to probe for stream 8
[mpegts @ 0x55e38d2ce7c0] probed stream 8 failed
[mpegts @ 0x55e38d2ce7c0] probed stream 9 failed
[mpegts @ 0x55e38d2ce7c0] probed stream 10 failed
[mpegts @ 0x55e38d2ce7c0] nothing to probe for stream 11
[mpegts @ 0x55e38d2ce7c0] probed stream 11 failed
[mpegts @ 0x55e38d2ce7c0] nothing to probe for stream 12
[mpegts @ 0x55e38d2ce7c0] probed stream 12 failed
[mpegts @ 0x55e38d2ce7c0] Invalid timestamps stream=9, pts=5222656109, dts=11177052571, size=398
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] changing packet size to 188
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 188
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 188
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] changing packet size to 204
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] changing packet size to 188
[mpegts @ 0x55e38d2ce7c0] changing packet size to 192
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 0 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 1 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 3 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 4 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 5 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 6 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 7 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 8 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 9 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 10 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 11 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
[mpegts @ 0x55e38d2ce7c0] Could not find codec parameters for stream 12 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (1000000000) options
Input #0, mpegts, from 'fileConfused-facemedia/Video-Enc/Film-Andere/mpeg+mpeg2video+mp2++Nausicaa.mpeg':
  Duration: N/A, start: 57645.346822, bitrate: N/A
  Stream #0:0[0x12aa]: Unknown: none
  Stream #0:1[0xf4d]: Unknown: none
  Stream #0:2[0x652]: Unknown: none
  Stream #0:3[0x1df0]: Unknown: none
  Stream #0:4[0x10e2]: Unknown: none
  Stream #0:5[0x1551]: Unknown: none
  Stream #0:6[0x11b]: Unknown: none
  Stream #0:7[0xaa5]: Unknown: none
  Stream #0:8[0x1084]: Unknown: none
  Stream #0:9[0x3]: Unknown: none
  Stream #0:10[0x1fdf]: Unknown: none
  Stream #0:11[0xb89]: Unknown: none
  Stream #0:12[0x2ce]: Unknown: none
[out#0/hls @ 0x55e38d798300] Cannot map stream #0:0 - unsupported type.
[out#0/hls @ 0x55e38d798300] If you want unsupported types ignored instead of failing, please use the -ignore_unknown option
If you want them copied, please use -copy_unknown


RE: Transcoding fails for MPEG1/MPEG2 videos with MP2 audio - gnattu - 2024-06-09

Regression from https://github.com/jellyfin/jellyfin/pull/9254/commits/47aa07c3424ce0041e0a79eea1ab7f6621485b94

The assumption that mpeg file is ts is wrong


RE: Transcoding fails for MPEG1/MPEG2 videos with MP2 audio - phoenix22 - 2024-06-09

(2024-06-09, 12:52 PM)gnattu Wrote: The assumption that mpeg file is ts is wrong

At the beginning I just looked at what stood in the Jellyfin user interface for the videos that didn't work
  Video: "MPEG1VIDEO SDR" or "MPEG2VIDEO SDR"
  Audio: "MP2 - Stereo"
 
But according to the error logs, these are all "ts" containers.