Playback of transcoded file ends early (response cut off at server side) #3600

Closed
opened 2026-02-06 23:37:28 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @Hendi48 on GitHub (Feb 11, 2022).

I'm facing an issue where playback on my client device stops after a couple minutes. Upon investigating a network trace, I found that Kestrel ends the HTTP response with \r\n0\r\n\r\n after 0x8590000 bytes have been read from the transcoded file. Incidentally this seems to fit pretty well with the timestamp at which the ffmpeg process ends after finishing transcoding. The file has its full size in the cache dir and is not deleted prematurely. It still exists as of now, 45 minutes after playback was interrupted. I copied the transcode to my local machine and it plays back fine at its full length.

I'll do some more digging tomorrow and check whether the interruption really coincides with ffmpeg exiting.

Media Info of the file

Matroska container, 720p h264 video, 2 EAC3 audio tracks, see ffmpeg log below for details.

Logs

[2022-02-11 00:34:29.998 +00:00] [INF] [90] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-f matroska,webm -autorotate 0 -i file:\"/media/path/to/file.mkv\" -map 0:0 -map 0:1 -codec:v:0 libx264 -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*dar)\,min(1920\,1080*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(1920/dar\,1080))/2)*2,format=yuv420p,subtitles='/media/path/to/file.mkv:si=0',setpts=PTS -0/TB\" -preset superfast -crf 23 -maxrate 4406737 -bufsize 8813474 -level 41 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 aac -ac 6 -ab 640000 -af \"asetpts=PTS-0/TB\" -y \"/config/transcodes/205d68f3833d5df1427f46c79e4fc156.ts\""
[2022-02-11 00:34:31.718 +00:00] [WRN] [88] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.2.34:8096/videos/7578e60c-88ed-ec0a-55bb-5d99be6c9c65/stream.ts?DeviceProfileId=f600447861f1ce46236b0724eb3755bc&DeviceId=test&MediaSourceId=7578e60c88edec0a55bb5d99be6c9c65&VideoCodec=h264&AudioCodec=aac,ac3,mp2&AudioStreamIndex=1&SubtitleStreamIndex=3&VideoBitrate=15360000&AudioBitrate=640000&MaxFramerate=30&MaxWidth=1920&MaxHeight=1080&SubtitleMethod=Encode&RequireAvc=false&Tag=be1d0d127a72624280523a2d509eec7d&h264-level=41&ac3-audiochannels=6&TranscodeReasons=AudioCodecNotSupported&dlnaheaders=true" to "192.168.2.42" in 0:00:01.7784945 with Status Code 200
[2022-02-11 00:35:03.727 +00:00] [INF] [55] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.2.23" closed
[2022-02-11 00:39:15.186 +00:00] [INF] [75] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0

FFmpeg Logs

/videos/7578e60c-88ed-ec0a-55bb-5d99be6c9c65/stream.ts

{"Protocol":0,"Id":"7578e60c88edec0a55bb5d99be6c9c65","Path":"/media/path/to/file.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":2289159168,"Name":"file","IsRemote":false,"ETag":"be1d0d127a72624280523a2d509eec7d","RunTimeTicks":41557438464,"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":"bt709","ColorTransfer":"bt709","ColorPrimaries":"bt709","Comment":null,"TimeBase":"1/1000","CodecTimeBase":"1001/48000","Title":null,"VideoRange":"SDR","LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"DisplayTitle":"1080p H264 SDR","NalLengthSize":"0","IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":4406737,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":678,"Width":1356,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"High","Type":1,"AspectRatio":"2:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":32,"IsAnamorphic":null},{"Codec":"eac3","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":null,"VideoRange":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"DisplayTitle":"Ger - Dolby Digital\u002B - 6 ch - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":768000,"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":"eac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":null,"VideoRange":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"DisplayTitle":"Eng - Dolby Digital\u002B - 6 ch","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":768000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"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":"subrip","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"German_Forced","VideoRange":null,"LocalizedUndefined":"Undefiniert","LocalizedDefault":"Standard","LocalizedForced":"Erzwungen","DisplayTitle":"German_Forced - Standard - Erzwungen - SUBRIP","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":3,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"subrip","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"German_Full","VideoRange":null,"LocalizedUndefined":"Undefiniert","LocalizedDefault":"Standard","LocalizedForced":"Erzwungen","DisplayTitle":"German_Full - SUBRIP","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":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"subrip","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"English_Full","VideoRange":null,"LocalizedUndefined":"Undefiniert","LocalizedDefault":"Standard","LocalizedForced":"Erzwungen","DisplayTitle":"English_Full - SUBRIP","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":[],"Formats":[],"Bitrate":5942737,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -f matroska,webm -autorotate 0 -i file:"/media/path/to/file.mkv" -map 0:0 -map 0:1 -codec:v:0 libx264 -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*dar)\,min(1920\,1080*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(1920/dar\,1080))/2)*2,format=yuv420p,subtitles='/media/path/to/file.mkv:si=0',setpts=PTS -0/TB" -preset superfast -crf 23 -maxrate 4406737 -bufsize 8813474 -level 41 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 aac -ac 6 -ab 640000 -af "asetpts=PTS-0/TB" -y "/config/transcodes/205d68f3833d5df1427f46c79e4fc156.ts"


ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  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
Input #0, matroska,webm, from 'file:/media/path/to/file.mkv':
  Metadata:
    encoder         : libebml v1.4.0 + libmatroska v1.6.2
    creation_time   : 2021-09-24T01:19:39.000000Z
  Duration: 01:09:15.74, start: 0.000000, bitrate: 4406 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1356x678 [SAR 1:1 DAR 2:1], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Metadata:
      BPS-eng         : 2868385
      DURATION-eng    : 01:09:15.735000000
      NUMBER_OF_FRAMES-eng: 99638
      NUMBER_OF_BYTES-eng: 1490031237
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(ger): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
    Metadata:
      BPS-eng         : 768000
      DURATION-eng    : 01:09:15.744000000
      NUMBER_OF_FRAMES-eng: 129867
      NUMBER_OF_BYTES-eng: 398951424
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s
    Metadata:
      BPS-eng         : 768000
      DURATION-eng    : 01:09:15.744000000
      NUMBER_OF_FRAMES-eng: 129867
      NUMBER_OF_BYTES-eng: 398951424
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(ger): Subtitle: subrip (default) (forced)
    Metadata:
      title           : German_Forced
      BPS-eng         : 0
      DURATION-eng    : 01:07:10.155000000
      NUMBER_OF_FRAMES-eng: 4
      NUMBER_OF_BYTES-eng: 95
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(ger): Subtitle: subrip
    Metadata:
      title           : German_Full
      BPS-eng         : 62
      DURATION-eng    : 01:08:07.087000000
      NUMBER_OF_FRAMES-eng: 792
      NUMBER_OF_BYTES-eng: 31846
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5(eng): Subtitle: subrip
    Metadata:
      title           : English_Full
      BPS-eng         : 58
      DURATION-eng    : 01:06:31.241000000
      NUMBER_OF_FRAMES-eng: 807
      NUMBER_OF_BYTES-eng: 29236
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[Parsed_subtitles_3 @ 0x5591d341e800] Shaper: FriBidi 1.0.8 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
[Parsed_subtitles_3 @ 0x5591d341e800] Using font provider fontconfig
[libx264 @ 0x5591d2c13d40] using SAR=1/1
[libx264 @ 0x5591d2c13d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5591d2c13d40] profile Main, level 4.1, 4:2:0, 8-bit
Output #0, mpegts, to '/config/transcodes/205d68f3833d5df1427f46c79e4fc156.ts':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 1356x678 [SAR 1:1 DAR 2:1], q=2-31, 23.98 fps, 90k tbn (default)
    Metadata:
      encoder         : Lavc58.134.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 4406000/0/0 buffer size: 8813000 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 640 kb/s (default)
    Metadata:
      encoder         : Lavc58.134.100 aac
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.66 bitrate=   0.0kbits/s speed=23.4x    
frame=    2 fps=1.6 q=0.0 size=       0kB time=00:00:00.66 bitrate=   0.0kbits/s speed=0.534x    
frame=  181 fps=104 q=24.0 size=     768kB time=00:00:08.02 bitrate= 784.3kbits/s speed= 4.6x    
frame=  352 fps=157 q=23.0 size=    5120kB time=00:00:15.25 bitrate=2749.8kbits/s speed= 6.8x    
frame=  520 fps=189 q=26.0 size=    9472kB time=00:00:22.14 bitrate=3504.1kbits/s speed=8.07x    
frame=  693 fps=214 q=26.0 size=   14080kB time=00:00:29.56 bitrate=3901.0kbits/s speed=9.11x    
frame=  860 fps=230 q=26.0 size=   18432kB time=00:00:36.50 bitrate=4136.7kbits/s speed=9.75x    
frame= 1038 fps=244 q=25.0 size=   22016kB time=00:00:43.77 bitrate=4120.0kbits/s speed=10.3x    
frame= 1201 fps=253 q=29.0 size=   26112kB time=00:00:50.68 bitrate=4220.1kbits/s speed=10.7x    
frame= 1378 fps=263 q=29.0 size=   30976kB time=00:00:58.04 bitrate=4371.5kbits/s speed=11.1x    
frame= 1556 fps=271 q=24.0 size=   35584kB time=00:01:05.36 bitrate=4459.6kbits/s speed=11.4x    
[Parsed_subtitles_3 @ 0x5591d341e800] fontselect: (Arial, 400, 0) -> /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf, 0, DejaVuSans
frame= 1731 fps=277 q=25.0 size=   40192kB time=00:01:12.66 bitrate=4531.3kbits/s speed=11.6x    
frame= 1913 fps=283 q=19.0 size=   41728kB time=00:01:20.38 bitrate=4252.5kbits/s speed=11.9x    
frame= 2004 fps=276 q=17.0 size=   42240kB time=00:01:24.24 bitrate=4107.4kbits/s speed=11.6x    
frame= 2189 fps=282 q=24.0 size=   44544kB time=00:01:31.79 bitrate=3975.1kbits/s speed=11.8x    
frame= 2374 fps=288 q=24.0 size=   47616kB time=00:01:39.64 bitrate=3914.5kbits/s speed=12.1x    
frame= 2556 fps=292 q=23.0 size=   50176kB time=00:01:47.02 bitrate=3840.5kbits/s speed=12.2x    
frame= 2749 fps=297 q=25.0 size=   52480kB time=00:01:55.28 bitrate=3729.1kbits/s speed=12.5x    
frame= 2937 fps=301 q=24.0 size=   55552kB time=00:02:03.02 bitrate=3699.0kbits/s speed=12.6x    
frame= 3117 fps=304 q=25.0 size=   59136kB time=00:02:10.49 bitrate=3712.3kbits/s speed=12.7x    
frame= 3289 fps=306 q=24.0 size=   62464kB time=00:02:17.68 bitrate=3716.5kbits/s speed=12.8x    
frame= 3463 fps=308 q=30.0 size=   67328kB time=00:02:24.98 bitrate=3804.3kbits/s speed=12.9x    
frame= 3639 fps=309 q=24.0 size=   70912kB time=00:02:32.21 bitrate=3816.4kbits/s speed=12.9x    
frame= 3817 fps=311 q=23.0 size=   73472kB time=00:02:39.87 bitrate=3764.8kbits/s speed=  13x    
frame= 4006 fps=314 q=22.0 size=   76032kB time=00:02:47.57 bitrate=3716.9kbits/s speed=13.1x    
frame= 4174 fps=315 q=25.0 size=   78592kB time=00:02:54.59 bitrate=3687.6kbits/s speed=13.2x    
frame= 4359 fps=317 q=25.0 size=   81152kB time=00:03:02.22 bitrate=3648.1kbits/s speed=13.2x    
frame= 4552 fps=319 q=20.0 size=   83712kB time=00:03:10.29 bitrate=3603.7kbits/s speed=13.3x    
frame= 4727 fps=320 q=23.0 size=   87296kB time=00:03:17.65 bitrate=3618.1kbits/s speed=13.4x    
frame= 4898 fps=321 q=25.0 size=   90624kB time=00:03:24.82 bitrate=3624.6kbits/s speed=13.4x    
frame= 5075 fps=322 q=25.0 size=   93440kB time=00:03:32.28 bitrate=3605.8kbits/s speed=13.5x    
frame= 5242 fps=322 q=23.0 size=   96768kB time=00:03:39.22 bitrate=3616.1kbits/s speed=13.5x    
frame= 5421 fps=323 q=23.0 size=   99840kB time=00:03:46.75 bitrate=3607.0kbits/s speed=13.5x    
frame= 5596 fps=324 q=21.0 size=  102656kB time=00:03:54.04 bitrate=3593.1kbits/s speed=13.5x    
frame= 5769 fps=325 q=23.0 size=  105472kB time=00:04:01.23 bitrate=3581.6kbits/s speed=13.6x    
frame= 5944 fps=325 q=22.0 size=  108032kB time=00:04:08.38 bitrate=3563.0kbits/s speed=13.6x    
frame= 6120 fps=326 q=25.0 size=  110848kB time=00:04:15.82 bitrate=3549.5kbits/s speed=13.6x    
frame= 6295 fps=326 q=23.0 size=  114176kB time=00:04:23.06 bitrate=3555.6kbits/s speed=13.6x    
frame= 6472 fps=327 q=24.0 size=  118016kB time=00:04:30.54 bitrate=3573.4kbits/s speed=13.7x    
frame= 6645 fps=328 q=25.0 size=  120832kB time=00:04:37.71 bitrate=3564.3kbits/s speed=13.7x    
frame= 6819 fps=328 q=24.0 size=  123648kB time=00:04:44.88 bitrate=3555.6kbits/s speed=13.7x    
frame= 6991 fps=328 q=25.0 size=  126720kB time=00:04:52.18 bitrate=3552.9kbits/s speed=13.7x    
frame= 7160 fps=329 q=24.0 size=  129792kB time=00:04:59.22 bitrate=3553.4kbits/s speed=13.7x    
frame= 7330 fps=329 q=23.0 size=  133120kB time=00:05:06.36 bitrate=3559.5kbits/s speed=13.7x    
frame= 7506 fps=329 q=23.0 size=  136448kB time=00:05:13.53 bitrate=3565.1kbits/s speed=13.8x    
frame= 7676 fps=330 q=23.0 size=  140288kB time=00:05:20.72 bitrate=3583.3kbits/s speed=13.8x    
frame= 7844 fps=330 q=26.0 size=  143104kB time=00:05:27.74 bitrate=3576.9kbits/s speed=13.8x    
frame= 8005 fps=330 q=23.0 size=  145920kB time=00:05:34.35 bitrate=3575.1kbits/s speed=13.8x    
frame= 8176 fps=330 q=28.0 size=  149248kB time=00:05:41.46 bitrate=3580.6kbits/s speed=13.8x    
frame= 8342 fps=330 q=23.0 size=  152576kB time=00:05:48.54 bitrate=3586.1kbits/s speed=13.8x    
frame= 8517 fps=330 q=24.0 size=  156160kB time=00:05:55.79 bitrate=3595.5kbits/s speed=13.8x    
frame= 8682 fps=330 q=25.0 size=  158464kB time=00:06:02.51 bitrate=3580.9kbits/s speed=13.8x    
frame= 8849 fps=330 q=25.0 size=  161536kB time=00:06:09.55 bitrate=3580.8kbits/s speed=13.8x    
frame= 9019 fps=330 q=25.0 size=  164352kB time=00:06:16.64 bitrate=3574.7kbits/s speed=13.8x    
* chop *
frame=99156 fps=349 q=20.0 size= 1439744kB time=01:08:56.12 bitrate=2851.6kbits/s speed=14.6x    
frame=99364 fps=350 q=23.0 size= 1441280kB time=01:09:04.78 bitrate=2848.6kbits/s speed=14.6x    
frame=99534 fps=350 q=19.0 size= 1442816kB time=01:09:12.08 bitrate=2846.7kbits/s speed=14.6x    
frame=99638 fps=349 q=-1.0 Lsize= 1443899kB time=01:09:15.73 bitrate=2846.3kbits/s speed=14.6x    
video:1042603kB audio:322725kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.754698%
[libx264 @ 0x5591d2c13d40] frame I:1917  Avg QP:15.52  size: 63213
[libx264 @ 0x5591d2c13d40] frame P:28790 Avg QP:17.44  size: 19861
[libx264 @ 0x5591d2c13d40] frame B:68931 Avg QP:18.85  size:  5435
[libx264 @ 0x5591d2c13d40] consecutive B-frames:  4.6%  8.5%  2.9% 84.0%
[libx264 @ 0x5591d2c13d40] mb I  I16..4: 42.6%  0.0% 57.4%
[libx264 @ 0x5591d2c13d40] mb P  I16..4: 29.9%  0.0%  0.0%  P16..4: 50.2%  0.0%  0.0%  0.0%  0.0%    skip:19.9%
[libx264 @ 0x5591d2c13d40] mb B  I16..4:  4.7%  0.0%  0.0%  B16..8: 23.3%  0.0%  0.0%  direct:15.7%  skip:56.3%  L0:39.9% L1:48.8% BI:11.3%
[libx264 @ 0x5591d2c13d40] coded y,uvDC,uvAC intra: 39.8% 56.4% 24.5% inter: 10.9% 19.5% 0.7%
[libx264 @ 0x5591d2c13d40] i16 v,h,dc,p: 38% 23% 21% 19%
[libx264 @ 0x5591d2c13d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 20% 16%  8%  6%  6%  5%  5%  5%
[libx264 @ 0x5591d2c13d40] i8c dc,h,v,p: 46% 21% 23% 10%
[libx264 @ 0x5591d2c13d40] Weighted P-Frames: Y:4.2% UV:2.2%
[libx264 @ 0x5591d2c13d40] kb/s:2055.23
[aac @ 0x5591d2c10c40] Qavg: 16133.592

Server System:

  • OS: Docker on Linux
  • Jellyfin Version: 10.8.0-alpha5
  • Hardware settings & device: Intel Core i5-10400, no hwaccel
  • Reverse proxy: no

Client System:

  • Device: Sony Bravia KDL-32WD755 (2016)
  • OS: Linux
  • Client: Sony/Mediatek dtv
Originally created by @Hendi48 on GitHub (Feb 11, 2022). I'm facing an issue where playback on my client device stops after a couple minutes. Upon investigating a network trace, I found that Kestrel ends the HTTP response with `\r\n0\r\n\r\n` after 0x8590000 bytes have been read from the transcoded file. Incidentally this seems to fit pretty well with the timestamp at which the ffmpeg process ends after finishing transcoding. The file has its full size in the cache dir and is not deleted prematurely. It still exists as of now, 45 minutes after playback was interrupted. I copied the transcode to my local machine and it plays back fine at its full length. I'll do some more digging tomorrow and check whether the interruption really coincides with ffmpeg exiting. **Media Info of the file** <!-- Use the Media Info tool (set to text format, download here: https://mediaarea.net/en/MediaInfo) or copy the info from the web ui for the file with the playback issue. --> Matroska container, 720p h264 video, 2 EAC3 audio tracks, see ffmpeg log below for details. **Logs** <!-- Please paste any log messages from during the playback issue. --> ``` [2022-02-11 00:34:29.998 +00:00] [INF] [90] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-f matroska,webm -autorotate 0 -i file:\"/media/path/to/file.mkv\" -map 0:0 -map 0:1 -codec:v:0 libx264 -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*dar)\,min(1920\,1080*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(1920/dar\,1080))/2)*2,format=yuv420p,subtitles='/media/path/to/file.mkv:si=0',setpts=PTS -0/TB\" -preset superfast -crf 23 -maxrate 4406737 -bufsize 8813474 -level 41 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 aac -ac 6 -ab 640000 -af \"asetpts=PTS-0/TB\" -y \"/config/transcodes/205d68f3833d5df1427f46c79e4fc156.ts\"" [2022-02-11 00:34:31.718 +00:00] [WRN] [88] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.2.34:8096/videos/7578e60c-88ed-ec0a-55bb-5d99be6c9c65/stream.ts?DeviceProfileId=f600447861f1ce46236b0724eb3755bc&DeviceId=test&MediaSourceId=7578e60c88edec0a55bb5d99be6c9c65&VideoCodec=h264&AudioCodec=aac,ac3,mp2&AudioStreamIndex=1&SubtitleStreamIndex=3&VideoBitrate=15360000&AudioBitrate=640000&MaxFramerate=30&MaxWidth=1920&MaxHeight=1080&SubtitleMethod=Encode&RequireAvc=false&Tag=be1d0d127a72624280523a2d509eec7d&h264-level=41&ac3-audiochannels=6&TranscodeReasons=AudioCodecNotSupported&dlnaheaders=true" to "192.168.2.42" in 0:00:01.7784945 with Status Code 200 [2022-02-11 00:35:03.727 +00:00] [INF] [55] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.2.23" closed [2022-02-11 00:39:15.186 +00:00] [INF] [75] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0 ``` **FFmpeg Logs** <!-- Please paste any FFmpeg logs if remuxing or transcoding appears to be part of the issue. --> ``` /videos/7578e60c-88ed-ec0a-55bb-5d99be6c9c65/stream.ts {"Protocol":0,"Id":"7578e60c88edec0a55bb5d99be6c9c65","Path":"/media/path/to/file.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":2289159168,"Name":"file","IsRemote":false,"ETag":"be1d0d127a72624280523a2d509eec7d","RunTimeTicks":41557438464,"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":"bt709","ColorTransfer":"bt709","ColorPrimaries":"bt709","Comment":null,"TimeBase":"1/1000","CodecTimeBase":"1001/48000","Title":null,"VideoRange":"SDR","LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"DisplayTitle":"1080p H264 SDR","NalLengthSize":"0","IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":4406737,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":678,"Width":1356,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"High","Type":1,"AspectRatio":"2:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":32,"IsAnamorphic":null},{"Codec":"eac3","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":null,"VideoRange":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"DisplayTitle":"Ger - Dolby Digital\u002B - 6 ch - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":768000,"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":"eac3","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":null,"VideoRange":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"DisplayTitle":"Eng - Dolby Digital\u002B - 6 ch","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":768000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"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":"subrip","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"German_Forced","VideoRange":null,"LocalizedUndefined":"Undefiniert","LocalizedDefault":"Standard","LocalizedForced":"Erzwungen","DisplayTitle":"German_Forced - Standard - Erzwungen - SUBRIP","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":3,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"subrip","CodecTag":null,"Language":"ger","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"German_Full","VideoRange":null,"LocalizedUndefined":"Undefiniert","LocalizedDefault":"Standard","LocalizedForced":"Erzwungen","DisplayTitle":"German_Full - SUBRIP","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":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"subrip","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"English_Full","VideoRange":null,"LocalizedUndefined":"Undefiniert","LocalizedDefault":"Standard","LocalizedForced":"Erzwungen","DisplayTitle":"English_Full - SUBRIP","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":[],"Formats":[],"Bitrate":5942737,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null} /usr/lib/jellyfin-ffmpeg/ffmpeg -f matroska,webm -autorotate 0 -i file:"/media/path/to/file.mkv" -map 0:0 -map 0:1 -codec:v:0 libx264 -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*dar)\,min(1920\,1080*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(1920/dar\,1080))/2)*2,format=yuv420p,subtitles='/media/path/to/file.mkv:si=0',setpts=PTS -0/TB" -preset superfast -crf 23 -maxrate 4406737 -bufsize 8813474 -level 41 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 aac -ac 6 -ab 640000 -af "asetpts=PTS-0/TB" -y "/config/transcodes/205d68f3833d5df1427f46c79e4fc156.ts" ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) 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 Input #0, matroska,webm, from 'file:/media/path/to/file.mkv': Metadata: encoder : libebml v1.4.0 + libmatroska v1.6.2 creation_time : 2021-09-24T01:19:39.000000Z Duration: 01:09:15.74, start: 0.000000, bitrate: 4406 kb/s Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1356x678 [SAR 1:1 DAR 2:1], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default) Metadata: BPS-eng : 2868385 DURATION-eng : 01:09:15.735000000 NUMBER_OF_FRAMES-eng: 99638 NUMBER_OF_BYTES-eng: 1490031237 _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(ger): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default) Metadata: BPS-eng : 768000 DURATION-eng : 01:09:15.744000000 NUMBER_OF_FRAMES-eng: 129867 NUMBER_OF_BYTES-eng: 398951424 _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s Metadata: BPS-eng : 768000 DURATION-eng : 01:09:15.744000000 NUMBER_OF_FRAMES-eng: 129867 NUMBER_OF_BYTES-eng: 398951424 _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:3(ger): Subtitle: subrip (default) (forced) Metadata: title : German_Forced BPS-eng : 0 DURATION-eng : 01:07:10.155000000 NUMBER_OF_FRAMES-eng: 4 NUMBER_OF_BYTES-eng: 95 _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:4(ger): Subtitle: subrip Metadata: title : German_Full BPS-eng : 62 DURATION-eng : 01:08:07.087000000 NUMBER_OF_FRAMES-eng: 792 NUMBER_OF_BYTES-eng: 31846 _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:5(eng): Subtitle: subrip Metadata: title : English_Full BPS-eng : 58 DURATION-eng : 01:06:31.241000000 NUMBER_OF_FRAMES-eng: 807 NUMBER_OF_BYTES-eng: 29236 _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-24 01:19:39 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (eac3 (native) -> aac (native)) Press [q] to stop, [?] for help [Parsed_subtitles_3 @ 0x5591d341e800] Shaper: FriBidi 1.0.8 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX) [Parsed_subtitles_3 @ 0x5591d341e800] Using font provider fontconfig [libx264 @ 0x5591d2c13d40] using SAR=1/1 [libx264 @ 0x5591d2c13d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x5591d2c13d40] profile Main, level 4.1, 4:2:0, 8-bit Output #0, mpegts, to '/config/transcodes/205d68f3833d5df1427f46c79e4fc156.ts': Metadata: encoder : Lavf58.76.100 Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 1356x678 [SAR 1:1 DAR 2:1], q=2-31, 23.98 fps, 90k tbn (default) Metadata: encoder : Lavc58.134.100 libx264 Side data: cpb: bitrate max/min/avg: 4406000/0/0 buffer size: 8813000 vbv_delay: N/A Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 640 kb/s (default) Metadata: encoder : Lavc58.134.100 aac frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.66 bitrate= 0.0kbits/s speed=23.4x frame= 2 fps=1.6 q=0.0 size= 0kB time=00:00:00.66 bitrate= 0.0kbits/s speed=0.534x frame= 181 fps=104 q=24.0 size= 768kB time=00:00:08.02 bitrate= 784.3kbits/s speed= 4.6x frame= 352 fps=157 q=23.0 size= 5120kB time=00:00:15.25 bitrate=2749.8kbits/s speed= 6.8x frame= 520 fps=189 q=26.0 size= 9472kB time=00:00:22.14 bitrate=3504.1kbits/s speed=8.07x frame= 693 fps=214 q=26.0 size= 14080kB time=00:00:29.56 bitrate=3901.0kbits/s speed=9.11x frame= 860 fps=230 q=26.0 size= 18432kB time=00:00:36.50 bitrate=4136.7kbits/s speed=9.75x frame= 1038 fps=244 q=25.0 size= 22016kB time=00:00:43.77 bitrate=4120.0kbits/s speed=10.3x frame= 1201 fps=253 q=29.0 size= 26112kB time=00:00:50.68 bitrate=4220.1kbits/s speed=10.7x frame= 1378 fps=263 q=29.0 size= 30976kB time=00:00:58.04 bitrate=4371.5kbits/s speed=11.1x frame= 1556 fps=271 q=24.0 size= 35584kB time=00:01:05.36 bitrate=4459.6kbits/s speed=11.4x [Parsed_subtitles_3 @ 0x5591d341e800] fontselect: (Arial, 400, 0) -> /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf, 0, DejaVuSans frame= 1731 fps=277 q=25.0 size= 40192kB time=00:01:12.66 bitrate=4531.3kbits/s speed=11.6x frame= 1913 fps=283 q=19.0 size= 41728kB time=00:01:20.38 bitrate=4252.5kbits/s speed=11.9x frame= 2004 fps=276 q=17.0 size= 42240kB time=00:01:24.24 bitrate=4107.4kbits/s speed=11.6x frame= 2189 fps=282 q=24.0 size= 44544kB time=00:01:31.79 bitrate=3975.1kbits/s speed=11.8x frame= 2374 fps=288 q=24.0 size= 47616kB time=00:01:39.64 bitrate=3914.5kbits/s speed=12.1x frame= 2556 fps=292 q=23.0 size= 50176kB time=00:01:47.02 bitrate=3840.5kbits/s speed=12.2x frame= 2749 fps=297 q=25.0 size= 52480kB time=00:01:55.28 bitrate=3729.1kbits/s speed=12.5x frame= 2937 fps=301 q=24.0 size= 55552kB time=00:02:03.02 bitrate=3699.0kbits/s speed=12.6x frame= 3117 fps=304 q=25.0 size= 59136kB time=00:02:10.49 bitrate=3712.3kbits/s speed=12.7x frame= 3289 fps=306 q=24.0 size= 62464kB time=00:02:17.68 bitrate=3716.5kbits/s speed=12.8x frame= 3463 fps=308 q=30.0 size= 67328kB time=00:02:24.98 bitrate=3804.3kbits/s speed=12.9x frame= 3639 fps=309 q=24.0 size= 70912kB time=00:02:32.21 bitrate=3816.4kbits/s speed=12.9x frame= 3817 fps=311 q=23.0 size= 73472kB time=00:02:39.87 bitrate=3764.8kbits/s speed= 13x frame= 4006 fps=314 q=22.0 size= 76032kB time=00:02:47.57 bitrate=3716.9kbits/s speed=13.1x frame= 4174 fps=315 q=25.0 size= 78592kB time=00:02:54.59 bitrate=3687.6kbits/s speed=13.2x frame= 4359 fps=317 q=25.0 size= 81152kB time=00:03:02.22 bitrate=3648.1kbits/s speed=13.2x frame= 4552 fps=319 q=20.0 size= 83712kB time=00:03:10.29 bitrate=3603.7kbits/s speed=13.3x frame= 4727 fps=320 q=23.0 size= 87296kB time=00:03:17.65 bitrate=3618.1kbits/s speed=13.4x frame= 4898 fps=321 q=25.0 size= 90624kB time=00:03:24.82 bitrate=3624.6kbits/s speed=13.4x frame= 5075 fps=322 q=25.0 size= 93440kB time=00:03:32.28 bitrate=3605.8kbits/s speed=13.5x frame= 5242 fps=322 q=23.0 size= 96768kB time=00:03:39.22 bitrate=3616.1kbits/s speed=13.5x frame= 5421 fps=323 q=23.0 size= 99840kB time=00:03:46.75 bitrate=3607.0kbits/s speed=13.5x frame= 5596 fps=324 q=21.0 size= 102656kB time=00:03:54.04 bitrate=3593.1kbits/s speed=13.5x frame= 5769 fps=325 q=23.0 size= 105472kB time=00:04:01.23 bitrate=3581.6kbits/s speed=13.6x frame= 5944 fps=325 q=22.0 size= 108032kB time=00:04:08.38 bitrate=3563.0kbits/s speed=13.6x frame= 6120 fps=326 q=25.0 size= 110848kB time=00:04:15.82 bitrate=3549.5kbits/s speed=13.6x frame= 6295 fps=326 q=23.0 size= 114176kB time=00:04:23.06 bitrate=3555.6kbits/s speed=13.6x frame= 6472 fps=327 q=24.0 size= 118016kB time=00:04:30.54 bitrate=3573.4kbits/s speed=13.7x frame= 6645 fps=328 q=25.0 size= 120832kB time=00:04:37.71 bitrate=3564.3kbits/s speed=13.7x frame= 6819 fps=328 q=24.0 size= 123648kB time=00:04:44.88 bitrate=3555.6kbits/s speed=13.7x frame= 6991 fps=328 q=25.0 size= 126720kB time=00:04:52.18 bitrate=3552.9kbits/s speed=13.7x frame= 7160 fps=329 q=24.0 size= 129792kB time=00:04:59.22 bitrate=3553.4kbits/s speed=13.7x frame= 7330 fps=329 q=23.0 size= 133120kB time=00:05:06.36 bitrate=3559.5kbits/s speed=13.7x frame= 7506 fps=329 q=23.0 size= 136448kB time=00:05:13.53 bitrate=3565.1kbits/s speed=13.8x frame= 7676 fps=330 q=23.0 size= 140288kB time=00:05:20.72 bitrate=3583.3kbits/s speed=13.8x frame= 7844 fps=330 q=26.0 size= 143104kB time=00:05:27.74 bitrate=3576.9kbits/s speed=13.8x frame= 8005 fps=330 q=23.0 size= 145920kB time=00:05:34.35 bitrate=3575.1kbits/s speed=13.8x frame= 8176 fps=330 q=28.0 size= 149248kB time=00:05:41.46 bitrate=3580.6kbits/s speed=13.8x frame= 8342 fps=330 q=23.0 size= 152576kB time=00:05:48.54 bitrate=3586.1kbits/s speed=13.8x frame= 8517 fps=330 q=24.0 size= 156160kB time=00:05:55.79 bitrate=3595.5kbits/s speed=13.8x frame= 8682 fps=330 q=25.0 size= 158464kB time=00:06:02.51 bitrate=3580.9kbits/s speed=13.8x frame= 8849 fps=330 q=25.0 size= 161536kB time=00:06:09.55 bitrate=3580.8kbits/s speed=13.8x frame= 9019 fps=330 q=25.0 size= 164352kB time=00:06:16.64 bitrate=3574.7kbits/s speed=13.8x * chop * frame=99156 fps=349 q=20.0 size= 1439744kB time=01:08:56.12 bitrate=2851.6kbits/s speed=14.6x frame=99364 fps=350 q=23.0 size= 1441280kB time=01:09:04.78 bitrate=2848.6kbits/s speed=14.6x frame=99534 fps=350 q=19.0 size= 1442816kB time=01:09:12.08 bitrate=2846.7kbits/s speed=14.6x frame=99638 fps=349 q=-1.0 Lsize= 1443899kB time=01:09:15.73 bitrate=2846.3kbits/s speed=14.6x video:1042603kB audio:322725kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.754698% [libx264 @ 0x5591d2c13d40] frame I:1917 Avg QP:15.52 size: 63213 [libx264 @ 0x5591d2c13d40] frame P:28790 Avg QP:17.44 size: 19861 [libx264 @ 0x5591d2c13d40] frame B:68931 Avg QP:18.85 size: 5435 [libx264 @ 0x5591d2c13d40] consecutive B-frames: 4.6% 8.5% 2.9% 84.0% [libx264 @ 0x5591d2c13d40] mb I I16..4: 42.6% 0.0% 57.4% [libx264 @ 0x5591d2c13d40] mb P I16..4: 29.9% 0.0% 0.0% P16..4: 50.2% 0.0% 0.0% 0.0% 0.0% skip:19.9% [libx264 @ 0x5591d2c13d40] mb B I16..4: 4.7% 0.0% 0.0% B16..8: 23.3% 0.0% 0.0% direct:15.7% skip:56.3% L0:39.9% L1:48.8% BI:11.3% [libx264 @ 0x5591d2c13d40] coded y,uvDC,uvAC intra: 39.8% 56.4% 24.5% inter: 10.9% 19.5% 0.7% [libx264 @ 0x5591d2c13d40] i16 v,h,dc,p: 38% 23% 21% 19% [libx264 @ 0x5591d2c13d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 20% 16% 8% 6% 6% 5% 5% 5% [libx264 @ 0x5591d2c13d40] i8c dc,h,v,p: 46% 21% 23% 10% [libx264 @ 0x5591d2c13d40] Weighted P-Frames: Y:4.2% UV:2.2% [libx264 @ 0x5591d2c13d40] kb/s:2055.23 [aac @ 0x5591d2c10c40] Qavg: 16133.592 ``` **Server System:** - OS: Docker on Linux - Jellyfin Version: 10.8.0-alpha5 - Hardware settings & device: Intel Core i5-10400, no hwaccel - Reverse proxy: no **Client System:** - Device: Sony Bravia KDL-32WD755 (2016) - OS: Linux - Client: Sony/Mediatek dtv
Author
Owner

@Hendi48 commented on GitHub (Feb 11, 2022):

Yes, this is definitely a bug with waiting for the ffmpeg process and then ending the HTTP connection. I sent SIGSTOP to the ffmpeg process to freeze it, and playback on the client continued way past the point where it normally stops.

I was also able to reproduce it with VLC by opening the stream.ts link there. Stops when ffmpeg is done.

@Hendi48 commented on GitHub (Feb 11, 2022): Yes, this is definitely a bug with waiting for the ffmpeg process and then ending the HTTP connection. I sent SIGSTOP to the ffmpeg process to freeze it, and playback on the client continued way past the point where it normally stops. I was also able to reproduce it with VLC by opening the `stream.ts` link there. Stops when ffmpeg is done.
Author
Owner

@Hendi48 commented on GitHub (Feb 12, 2022):

Regression introduced by ca887518dd. KeepReading will return false when the job has exited, despite there being many bytes left to be read in the stream.

@Hendi48 commented on GitHub (Feb 12, 2022): Regression introduced by ca887518dd135088242a9c3263c6d882156294e7. `KeepReading` will return false when the job has exited, despite there being many bytes left to be read in the stream.
Author
Owner

@cvium commented on GitHub (Feb 12, 2022):

Thank you for the investigative work

@cvium commented on GitHub (Feb 12, 2022): Thank you for the investigative work
Author
Owner

@Mustachipleb commented on GitHub (Jun 18, 2022):

Recently updated to 10.8, where this issue seems to still happen.
Log (Around 13:45 mark):
log_20220618.log
FFMPEG Log:
FFmpeg.Transcode-2022-06-18_13-11-47_69ebb3a677cfe2cd5eb94f65aa03203e_bd006c25.log
Server System:

OS: Docker on Ubuntu 20.04
Jellyfin Version: 10.8.0
Hardware settings & device: Intel Core i7-6700K, HWA with GTX 1070 (Driver ver. 510.73.08)
Reverse proxy: Traefik (Logs are from local playback but problem persists across both proxied and non-proxied connections)
Client System:

Device: AMD Ryzen 5 5600X + RTX 3080
OS: Windows 10 Build 19044
Client: Edge v102.0.1245.41

@Mustachipleb commented on GitHub (Jun 18, 2022): Recently updated to 10.8, where this issue seems to still happen. Log (Around 13:45 mark): [log_20220618.log](https://github.com/jellyfin/jellyfin/files/8933489/log_20220618.log) FFMPEG Log: [FFmpeg.Transcode-2022-06-18_13-11-47_69ebb3a677cfe2cd5eb94f65aa03203e_bd006c25.log](https://github.com/jellyfin/jellyfin/files/8933490/FFmpeg.Transcode-2022-06-18_13-11-47_69ebb3a677cfe2cd5eb94f65aa03203e_bd006c25.log) Server System: OS: Docker on Ubuntu 20.04 Jellyfin Version: 10.8.0 Hardware settings & device: Intel Core i7-6700K, HWA with GTX 1070 (Driver ver. 510.73.08) Reverse proxy: Traefik (Logs are from local playback but problem persists across both proxied and non-proxied connections) Client System: Device: AMD Ryzen 5 5600X + RTX 3080 OS: Windows 10 Build 19044 Client: Edge v102.0.1245.41
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#3600