Jellyfin crashing during playback

Been running containered services for some time and always managed to fix issue but this one has me beat.

Playing a video fine, FFMPEG working no sweat, then video stream crashes. Jellyfin server becomes unresponsive although container is still fine. Only way to restore the service is to restart the container.

I’m running on a Raspberry Pi 4 (4gb). Below is the yaml contents;

version: "3"
services:
  jellyfin_live:
    image: linuxserver/jellyfin
    container_name: jellyfin_live
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - UMASK_SET=022 #optional
    volumes:
      - /mnt/qnap_docker/config/jellyfin_live:/config
      - /mnt/qnap_media/Movies:/data/Movies
      - /mnt/qnap_media/TV:/data/TV
      - /mnt/qnap_media/Recordings:/data/Recordings
    ports:
      - 8096:8096
    restart: unless-stopped

/mnt/qnap_docker is a NFS mounted directory running on a QNAP NAS.
/mnt/qnap_media is a CIFS mounted directory running on the same QNAP NAS

Time of death is 16:58

Log

[2020-09-23 16:52:31.965 +01:00] [WRN] [45] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to "192.168.0.37". Time (slow): 0:00:03.1204944. "ttp://192.168.0.100:8096/videos/73fbbc93-2a73-c739-7f4e-37cdec09e6c8/hls1/main/297.ts?DeviceId=EA2838CE-860C-4DEC-B288-AC4BAE9C82C2&MediaSourceId=73fbbc932a73c7397f4e37cdec09e6c8&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=139808000&AudioBitrate=192000&PlaySessionId=ca5d799417d945fab6a3e99cb2dc8f55&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=3c47f0988be445ead036b430a0872b44&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&h264-deinterlace=true&TranscodeReasons=ContainerNotSupported,VideoCodecNotSupported,AudioCodecNotSupported"
[2020-09-23 16:52:50.793 +01:00] [WRN] [47] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to "192.168.0.37". Time (slow): 0:00:00.50017. "ttp://192.168.0.100:8096/videos/73fbbc93-2a73-c739-7f4e-37cdec09e6c8/hls1/main/303.ts?DeviceId=EA2838CE-860C-4DEC-B288-AC4BAE9C82C2&MediaSourceId=73fbbc932a73c7397f4e37cdec09e6c8&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=139808000&AudioBitrate=192000&PlaySessionId=ca5d799417d945fab6a3e99cb2dc8f55&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=3c47f0988be445ead036b430a0872b44&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&h264-deinterlace=true&TranscodeReasons=ContainerNotSupported,VideoCodecNotSupported,AudioCodecNotSupported"
[2020-09-23 16:57:27.577 +01:00] [WRN] [64] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to "192.168.0.37". Time (slow): 0:00:01.2590268. "ttp://192.168.0.100:8096/videos/73fbbc93-2a73-c739-7f4e-37cdec09e6c8/hls1/main/397.ts?DeviceId=EA2838CE-860C-4DEC-B288-AC4BAE9C82C2&MediaSourceId=73fbbc932a73c7397f4e37cdec09e6c8&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=139808000&AudioBitrate=192000&PlaySessionId=ca5d799417d945fab6a3e99cb2dc8f55&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=3c47f0988be445ead036b430a0872b44&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&h264-deinterlace=true&TranscodeReasons=ContainerNotSupported,VideoCodecNotSupported,AudioCodecNotSupported"
**[2020-09-23 16:58:07.349 +01:00] [INF] [64] MediaBrowser.Api.Playback.Hls.DynamicHlsService: FFMpeg exited with code 0**
[2020-09-23 17:03:24.904 +01:00] [WRN] [258] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "::ffff:192.168.0.37" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."
[2020-09-23 17:03:24.923 +01:00] [INF] [258] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS "::ffff:192.168.0.37" closed

FFMPEG Log

frame=   13 fps=0.0 q=0.0 size=N/A time=00:00:00.81 bitrate=N/A speed=1.58x
frame=   29 fps= 29 q=28.0 size=N/A time=00:00:01.60 bitrate=N/A speed=1.58x
frame=   47 fps= 31 q=28.0 size=N/A time=00:00:02.10 bitrate=N/A speed=1.39x
frame=   65 fps= 32 q=28.0 size=N/A time=00:00:02.82 bitrate=N/A speed=1.39x
frame=   84 fps= 33 q=28.0 size=N/A time=00:00:03.47 bitrate=N/A speed=1.36x
[hls @ 0x37c21c0] Opening '/tmp/b16d6944b3236598a524421d3385d3e80.ts' for writing
frame=   96 fps= 31 q=28.0 size=N/A time=00:00:03.98 bitrate=N/A speed=1.29x
frame=  112 fps= 31 q=28.0 size=N/A time=00:00:04.84 bitrate=N/A speed=1.35x
frame=  128 fps= 31 q=28.0 size=N/A time=00:00:05.30 bitrate=N/A speed= 1.3x
frame=  144 fps= 31 q=28.0 size=N/A time=00:00:05.97 bitrate=N/A speed= 1.3x
frame=  159 fps= 31 q=28.0 size=N/A time=00:00:06.50 bitrate=N/A speed=1.26x
[hls @ 0x37c21c0] Opening '/tmp/b16d6944b3236598a524421d3385d3e81.ts' for writing
frame=  172 fps= 30 q=28.0 size=N/A time=00:00:07.34 bitrate=N/A speed= 1.3x
frame=  186 fps= 30 q=28.0 size=N/A time=00:00:07.70 bitrate=N/A speed=1.24x
[hls @ 0x37c21c0] Opening '/tmp/b16d6944b3236598a524421d3385d3e82.ts' for writing
frame=  189 fps= 29 q=-1.0 Lsize=N/A time=00:00:07.91 bitrate=N/A speed=1.22x
video:2073kB audio:186kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x37d35f0] frame I:3     Avg QP:18.09  size: 22540
[libx264 @ 0x37d35f0] frame P:73    Avg QP:22.94  size: 16008
[libx264 @ 0x37d35f0] frame B:113   Avg QP:24.92  size:  7841
[libx264 @ 0x37d35f0] consecutive B-frames: 14.3% 12.7% 15.9% 57.1%
[libx264 @ 0x37d35f0] mb I  I16..4: 52.7%  0.0% 47.3%
[libx264 @ 0x37d35f0] mb P  I16..4: 37.2%  0.0%  0.0%  P16..4: 29.1%  0.0%  0.0%  0.0%  0.0%    skip:33.7%
[libx264 @ 0x37d35f0] mb B  I16..4:  8.3%  0.0%  0.0%  B16..8: 21.1%  0.0%  0.0%  direct:11.5%  skip:59.1%  L0:40.9% L1:43.8% BI:15.2%
[libx264 @ 0x37d35f0] coded y,uvDC,uvAC intra: 65.1% 13.0% 3.2% inter: 19.0% 14.0% 0.3%
[libx264 @ 0x37d35f0] i16 v,h,dc,p: 28% 20% 35% 17%
[libx264 @ 0x37d35f0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 14% 20%  4% 13%  9%  5%  5%  5%
[libx264 @ 0x37d35f0] i8c dc,h,v,p: 74% 13% 11%  2%
[libx264 @ 0x37d35f0] Weighted P-Frames: Y:16.4% UV:11.0%
[libx264 @ 0x37d35f0] kb/s:2245.73

I’ve ping’d the QNAP from the Raspi throughout with no dropped packages so isn’t network related.
Can still exec -it into the container so no problems there either.

Any thoughts?

Don’t run manual commands inside the container. Our support ends there.

Fair enough, I’ll build from scratch