Consumer count off by one when closing a browser tab with a livestream and the transcoding kill timer is triggered #6829

Closed
opened 2026-02-07 04:10:33 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @timminator on GitHub (Mar 15, 2025).

Description of the bug

When closing a browser tab with a livestream that is transcoded or remuxed the consumer count is reduced by 2 instead of one.
This brakes the stream of a second person that is also watching because the stream is closed when the consumer count reaches zero.

What I found out:

  • When a livestream, that is transcoding, is closed, "CloseIfNeededAsync" is called which reduces the consumer count by one.
  • Sometimes PlaybackStopped is not reported and instead one minute later the transcoding job is killed. "TranscodingJob" then also calls closelivestream and reduces the consumer count again by one.
  • The stream is closed and the stream breaks for the second person watching
  • This can also be seen in the log I provided below.

When more than two people are watching the stream will always brake for the last person watching aswell.

The issue is very closely related to #13219.

Reproduction steps

  1. Watch a livestream on two devices. The stream has to be transcoded or remuxed on both devices. Atleast one device has to be watching inside a browser.
  2. Close the browser tab with the ongoing stream that is transcoding instead of clicking the back button.
  3. Wait one minute until the kill timer expires and the stream on the second device will break.

It is not consistently reproducable because normally PlaybackStopped is reported.

What is the current bug behavior?

The stream closes on an unrelated device that did not send a quit signal.

What is the expected correct behavior?

The stream should not stop on an unrelated device in this situation.

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.3

Environment

- OS: Windows 11
- Linux Kernel:
- Virtualization:
- Clients: Browser, Android, Fire Stick
- Browser: Chrome 131
- FFmpeg Version: 7.0
- Playback Method: Transcode, Remuxing
- Hardware Acceleration: Nvenc
- GPU Model: Nvidia Geforce GTX 1660 Ti
- Plugins:
- Reverse Proxy:
- Base URL: 
- Networking:
- Storage:

Jellyfin logs

[15:55:18] [INF] [19] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 127.0.0.1 request
[15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ARD
[15:55:22] [INF] [13] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ARD
[15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF
[15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF
[15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF2
[15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF2
[15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: Stream1
[15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: Stream1
[15:55:22] [INF] [19] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[15:55:22] [INF] [20] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[15:55:22] [INF] [19] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from Emby, external channel Id: m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205
[15:55:22] [INF] [19] Jellyfin.LiveTv.DefaultLiveTvService: Streaming Channel m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205
[15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Live stream opened after 0.1055ms
[15:55:22] [INF] [19] Jellyfin.LiveTv.DefaultLiveTvService: Returning mediasource streamId a30d2ab40a1c24c15fb07e9537d38205, mediaSource.Id a30d2ab40a1c24c15fb07e9537d38205, mediaSource.LiveStreamId null
[15:55:22] [INF] [20] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from Emby, external channel Id: m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205
[15:55:22] [INF] [20] Jellyfin.LiveTv.DefaultLiveTvService: Streaming Channel m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205
[15:55:22] [INF] [20] Jellyfin.LiveTv.DefaultLiveTvService: Live stream a30d2ab40a1c24c15fb07e9537d38205 consumer count is now 2
[15:55:22] [INF] [18] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took 0.0096465 seconds
[15:55:22] [INF] [19] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took 0.0006321 seconds
[15:55:22] [INF] [18] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: {"Protocol": "Http", "Id": "a30d2ab40a1c24c15fb07e9537d38205", "Path": "http://192.168.11.167:8081/hls/stream.m3u8", "EncoderPath": null, "EncoderProtocol": null, "Type": "Default", "Container": "hls", "Size": 97, "Name": null, "IsRemote": false, "ETag": null, "RunTimeTicks": null, "ReadAtNativeFramerate": false, "IgnoreDts": false, "IgnoreIndex": false, "GenPtsInput": false, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": true, "IsInfiniteStream": true, "UseMostCompatibleTranscodingProfile": true, "RequiresOpening": true, "OpenToken": null, "RequiresClosing": true, "LiveStreamId": "e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205", "BufferMs": null, "RequiresLooping": false, "SupportsProbing": true, "VideoType": null, "IsoType": null, "Video3DFormat": null, "MediaStreams": [{"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, {"Codec": "aac", "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, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "Unknown", "VideoRangeType": "Unknown", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": "Default", "LocalizedForced": null, "LocalizedExternal": "External", "LocalizedHearingImpaired": null, "DisplayTitle": "AAC - Stereo", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": "stereo", "BitRate": 192000, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": null, "Width": null, "AverageFrameRate": null, "RealFrameRate": null, "ReferenceFrameRate": null, "Profile": "LC", "Type": "Audio", "AspectRatio": null, "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null, "$type": "MediaStream"}], "MediaAttachments": [], "Formats": [], "Bitrate": 20192000, "FallbackMaxStreamingBitrate": 30000000, "Timestamp": null, "RequiredHttpHeaders": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"}, "TranscodingUrl": null, "TranscodingSubProtocol": "http", "TranscodingContainer": null, "AnalyzeDurationMs": 3000, "TranscodeReasons": "0", "DefaultAudioStreamIndex": null, "DefaultSubtitleStreamIndex": null, "HasSegments": false, "VideoStream": {"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, "$type": "MediaSourceInfo"}
[15:55:22] [INF] [19] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: {"Protocol": "Http", "Id": "a30d2ab40a1c24c15fb07e9537d38205", "Path": "http://192.168.11.167:8081/hls/stream.m3u8", "EncoderPath": null, "EncoderProtocol":
 null, "Type": "Default", "Container": "hls", "Size": 97, "Name": null, "IsRemote": false, "ETag": null, "RunTimeTicks": null, "ReadAtNativeFramerate": false, "IgnoreDts": false, "IgnoreIndex": false, "GenPtsInput": false, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": true, "IsInfiniteStream": true, "UseMostCompatibleTranscodingProfile": true, "RequiresOpening": true, "OpenToken": null, "RequiresClosing": true, "LiveStreamId": "e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205", "BufferMs": null, "RequiresLooping": false, "SupportsProbing": true, "VideoType": null, "IsoType": null, "Video3DFormat": null, "MediaStreams": [{"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined":
 null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, {"Codec": "aac", "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, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "Unknown", "VideoRangeType": "Unknown", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": "Default", "LocalizedForced": null, "LocalizedExternal": "External", "LocalizedHearingImpaired": null, "DisplayTitle": "AAC - Stereo", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": "stereo", "BitRate": 192000, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": null, "Width": null, "AverageFrameRate": null, "RealFrameRate": null, "ReferenceFrameRate": null, "Profile": "LC", "Type": "Audio", "AspectRatio": null, "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null, "$type": "MediaStream"}], "MediaAttachments": [], "Formats": [], "Bitrate": 20192000, "FallbackMaxStreamingBitrate": 30000000, "Timestamp": null, "RequiredHttpHeaders": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"}, "TranscodingUrl": null, "TranscodingSubProtocol": "http", "TranscodingContainer": null, "AnalyzeDurationMs": 3000, "TranscodeReasons": "0", "DefaultAudioStreamIndex": null, "DefaultSubtitleStreamIndex": null, "HasSegments": false, "VideoStream": {"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, "$type": "MediaSourceInfo"}
[15:55:22] [INF] [18] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[15:55:23] [INF] [19] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[15:55:23] [INF] [18] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: ffmpeg -analyzeduration 3000000 -probesize 1G -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"  -i "http://192.168.11.167:8081/hls/stream.m3u8" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 2808000 -bufsize 5616000 -profile:v:0 high -level 40 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hex:open_gop=0 -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,scale=trunc(min(max(iw\,ih*a)\,1280)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -flags -global_header -codec:a:0 copy -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_base_url "hls/be540cba669e9c6b72f920948e2bb0da/" -hls_segment_filename "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\be540cba669e9c6b72f920948e2bb0da%d.ts" -hls_playlist_type event -hls_list_size 0 -y "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\be540cba669e9c6b72f920948e2bb0da.m3u8"
[15:55:23] [INF] [20] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[15:55:23] [INF] [20] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: ffmpeg -analyzeduration 3000000 -probesize 1G -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"  -i "http://192.168.11.167:8081/hls/stream.m3u8" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 2808000 -bufsize 5616000 -profile:v:0 high -level 40 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hex:open_gop=0 -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,scale=trunc(min(max(iw\,ih*a)\,1280)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -flags -global_header -codec:a:0 copy -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_base_url "hls/f363b6d43ac053e3aa4c0e7ee518c78b/" -hls_segment_filename "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b%d.ts" -hls_playlist_type event -hls_list_size 0 -y "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8"
[15:55:25] [INF] [21] Emby.Server.Implementations.Library.MediaSourceManager: Live stream a30d2ab40a1c24c15fb07e9537d38205 consumer count is now 1
[15:55:25] [INF] [21] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 127.0.0.1 closed
[15:56:25] [INF] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Transcoding kill timer stopped for JobId 1c07b8b920434f808e9f014860782de6 PlaySessionId b012804d40e74fa093a21a9a329516d9. Killing transcoding
[15:56:25] [INF] [21] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8
[15:56:30] [INF] [21] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Killing FFmpeg process for C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8
[15:56:30] [INF] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8
[15:56:30] [ERR] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code -1
[15:56:32] [INF] [22] Emby.Server.Implementations.Library.MediaSourceManager: Live stream a30d2ab40a1c24c15fb07e9537d38205 consumer count is now 0
[15:56:32] [INF] [22] Emby.Server.Implementations.Library.MediaSourceManager: Closing live stream e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205
[15:56:32] [INF] [22] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Closing LiveStream
[15:56:32] [INF] [22] Emby.Server.Implementations.Library.MediaSourceManager: Live stream e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205 closed successfully
[15:56:33] [ERR] [22] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL GET /videos/d8acb535-3c78-9ff7-5521-83be82bc5ee0/live.m3u8.
MediaBrowser.Common.Extensions.ResourceNotFoundException: Exception of type 'MediaBrowser.Common.Extensions.ResourceNotFoundException' was thrown.
   at Emby.Server.Implementations.Library.MediaSourceManager.GetLiveStreamWithDirectStreamProvider(String id, CancellationToken cancellationToken) in C:\Users\GPUVM\Downloads\jellyfin-master\Emby.Server.Implementations\Library\MediaSourceManager.cs:line 793
   at Jellyfin.Api.Helpers.StreamingHelpers.GetStreamingState(StreamingRequestDto streamingRequest, HttpContext httpContext, IMediaSourceManager mediaSourceManager, IUserManager userManager, ILibraryManager libraryManager, IServerConfigurationManager serverConfigurationManager, IMediaEncoder mediaEncoder, EncodingHelper encodingHelper, ITranscodeManager transcodeManager, TranscodingJobType transcodingJobType, CancellationToken cancellationToken) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Helpers\StreamingHelpers.cs:line 145
   at Jellyfin.Api.Controllers.DynamicHlsController.GetLiveHlsStream(Guid itemId, String container, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 enableSubtitlesInManifest, Boolean enableAudioVbrEncoding, Boolean alwaysBurnInSubtitleWhenTranscoding) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Controllers\DynamicHlsController.cs:line 285
   at lambda_method3055(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\ServerStartupMessageMiddleware.cs:line 41
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\WebSocketHandlerMiddleware.cs:line 33
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\IpBasedAccessValidationMiddleware.cs:line 49
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\LanFilteringMiddleware.cs:line 37
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\QueryStringDecodingMiddleware.cs:line 36
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\RobotsRedirectionMiddleware.cs:line 43
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\LegacyEmbyRouteRewriteMiddleware.cs:line 51
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\ResponseTimeMiddleware.cs:line 66
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\ExceptionMiddleware.cs:line 55
[15:57:05] [INF] [17] Emby.Server.Implementations.Session.SessionManager: Sending shutdown notifications
[15:57:05] [INF] [21] Main: Running query planner optimizations in the database... This might take a while
[15:57:05] [INF] [22] Emby.Server.Implementations.IO.LibraryMonitor: Stopping directory watching for path C:\Users\GPUVM\Documents\Shows
[15:57:05] [INF] [22] Emby.Server.Implementations.IO.LibraryMonitor: Stopping directory watching for path C:\Users\GPUVM\Documents\Filme
[15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzArtistProvider
[15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzAlbumProvider
[15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing PluginManager

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @timminator on GitHub (Mar 15, 2025). ### Description of the bug When closing a browser tab with a livestream that is transcoded or remuxed the consumer count is reduced by 2 instead of one. This brakes the stream of a second person that is also watching because the stream is closed when the consumer count reaches zero. What I found out: - When a livestream, that is transcoding, is closed, "CloseIfNeededAsync" is called which reduces the consumer count by one. - Sometimes PlaybackStopped is not reported and instead one minute later the transcoding job is killed. "TranscodingJob" then also calls closelivestream and reduces the consumer count again by one. - The stream is closed and the stream breaks for the second person watching - This can also be seen in the log I provided below. When more than two people are watching the stream will always brake for the last person watching aswell. The issue is very closely related to #13219. ### Reproduction steps 1. Watch a livestream on two devices. The stream has to be transcoded or remuxed on both devices. Atleast one device has to be watching inside a browser. 2. Close the browser tab with the ongoing stream that is transcoding instead of clicking the back button. 3. Wait one minute until the kill timer expires and the stream on the second device will break. It is not consistently reproducable because normally PlaybackStopped is reported. ### What is the current _bug_ behavior? The stream closes on an unrelated device that did not send a quit signal. ### What is the expected _correct_ behavior? The stream should not stop on an unrelated device in this situation. ### Jellyfin Server version 10.10.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version 10.10.3 ### Environment ```markdown - OS: Windows 11 - Linux Kernel: - Virtualization: - Clients: Browser, Android, Fire Stick - Browser: Chrome 131 - FFmpeg Version: 7.0 - Playback Method: Transcode, Remuxing - Hardware Acceleration: Nvenc - GPU Model: Nvidia Geforce GTX 1660 Ti - Plugins: - Reverse Proxy: - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell [15:55:18] [INF] [19] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 127.0.0.1 request [15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ARD [15:55:22] [INF] [13] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ARD [15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF [15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF [15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF2 [15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: ZDF2 [15:55:22] [INF] [20] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: Stream1 [15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Parsed channel: Stream1 [15:55:22] [INF] [19] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:55:22] [INF] [20] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:55:22] [INF] [19] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from Emby, external channel Id: m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205 [15:55:22] [INF] [19] Jellyfin.LiveTv.DefaultLiveTvService: Streaming Channel m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205 [15:55:22] [INF] [19] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Live stream opened after 0.1055ms [15:55:22] [INF] [19] Jellyfin.LiveTv.DefaultLiveTvService: Returning mediasource streamId a30d2ab40a1c24c15fb07e9537d38205, mediaSource.Id a30d2ab40a1c24c15fb07e9537d38205, mediaSource.LiveStreamId null [15:55:22] [INF] [20] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from Emby, external channel Id: m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205 [15:55:22] [INF] [20] Jellyfin.LiveTv.DefaultLiveTvService: Streaming Channel m3u_0c53de7da04278e07e5703079b4217f5a30d2ab40a1c24c15fb07e9537d38205 [15:55:22] [INF] [20] Jellyfin.LiveTv.DefaultLiveTvService: Live stream a30d2ab40a1c24c15fb07e9537d38205 consumer count is now 2 [15:55:22] [INF] [18] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took 0.0096465 seconds [15:55:22] [INF] [19] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took 0.0006321 seconds [15:55:22] [INF] [18] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: {"Protocol": "Http", "Id": "a30d2ab40a1c24c15fb07e9537d38205", "Path": "http://192.168.11.167:8081/hls/stream.m3u8", "EncoderPath": null, "EncoderProtocol": null, "Type": "Default", "Container": "hls", "Size": 97, "Name": null, "IsRemote": false, "ETag": null, "RunTimeTicks": null, "ReadAtNativeFramerate": false, "IgnoreDts": false, "IgnoreIndex": false, "GenPtsInput": false, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": true, "IsInfiniteStream": true, "UseMostCompatibleTranscodingProfile": true, "RequiresOpening": true, "OpenToken": null, "RequiresClosing": true, "LiveStreamId": "e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205", "BufferMs": null, "RequiresLooping": false, "SupportsProbing": true, "VideoType": null, "IsoType": null, "Video3DFormat": null, "MediaStreams": [{"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, {"Codec": "aac", "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, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "Unknown", "VideoRangeType": "Unknown", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": "Default", "LocalizedForced": null, "LocalizedExternal": "External", "LocalizedHearingImpaired": null, "DisplayTitle": "AAC - Stereo", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": "stereo", "BitRate": 192000, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": null, "Width": null, "AverageFrameRate": null, "RealFrameRate": null, "ReferenceFrameRate": null, "Profile": "LC", "Type": "Audio", "AspectRatio": null, "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null, "$type": "MediaStream"}], "MediaAttachments": [], "Formats": [], "Bitrate": 20192000, "FallbackMaxStreamingBitrate": 30000000, "Timestamp": null, "RequiredHttpHeaders": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"}, "TranscodingUrl": null, "TranscodingSubProtocol": "http", "TranscodingContainer": null, "AnalyzeDurationMs": 3000, "TranscodeReasons": "0", "DefaultAudioStreamIndex": null, "DefaultSubtitleStreamIndex": null, "HasSegments": false, "VideoStream": {"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, "$type": "MediaSourceInfo"} [15:55:22] [INF] [19] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: {"Protocol": "Http", "Id": "a30d2ab40a1c24c15fb07e9537d38205", "Path": "http://192.168.11.167:8081/hls/stream.m3u8", "EncoderPath": null, "EncoderProtocol": null, "Type": "Default", "Container": "hls", "Size": 97, "Name": null, "IsRemote": false, "ETag": null, "RunTimeTicks": null, "ReadAtNativeFramerate": false, "IgnoreDts": false, "IgnoreIndex": false, "GenPtsInput": false, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": true, "IsInfiniteStream": true, "UseMostCompatibleTranscodingProfile": true, "RequiresOpening": true, "OpenToken": null, "RequiresClosing": true, "LiveStreamId": "e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205", "BufferMs": null, "RequiresLooping": false, "SupportsProbing": true, "VideoType": null, "IsoType": null, "Video3DFormat": null, "MediaStreams": [{"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, {"Codec": "aac", "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, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "Unknown", "VideoRangeType": "Unknown", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": "Default", "LocalizedForced": null, "LocalizedExternal": "External", "LocalizedHearingImpaired": null, "DisplayTitle": "AAC - Stereo", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": "stereo", "BitRate": 192000, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": null, "Width": null, "AverageFrameRate": null, "RealFrameRate": null, "ReferenceFrameRate": null, "Profile": "LC", "Type": "Audio", "AspectRatio": null, "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null, "$type": "MediaStream"}], "MediaAttachments": [], "Formats": [], "Bitrate": 20192000, "FallbackMaxStreamingBitrate": 30000000, "Timestamp": null, "RequiredHttpHeaders": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"}, "TranscodingUrl": null, "TranscodingSubProtocol": "http", "TranscodingContainer": null, "AnalyzeDurationMs": 3000, "TranscodeReasons": "0", "DefaultAudioStreamIndex": null, "DefaultSubtitleStreamIndex": null, "HasSegments": false, "VideoStream": {"Codec": "h264", "CodecTag": null, "Language": null, "ColorRange": "tv", "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Rotation": null, "Comment": null, "TimeBase": "1/90000", "CodecTimeBase": null, "Title": null, "VideoRange": "SDR", "VideoRangeType": "SDR", "VideoDoViTitle": null, "AudioSpatialFormat": "None", "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "1080p H264 SDR", "NalLengthSize": "0", "IsInterlaced": false, "IsAVC": null, "ChannelLayout": null, "BitRate": 20000000, "BitDepth": 8, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 30, "RealFrameRate": 30, "ReferenceFrameRate": 30, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": -1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "IsPgsSubtitleStream": false, "IsExtractableSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false, "$type": "MediaStream"}, "$type": "MediaSourceInfo"} [15:55:22] [INF] [18] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:55:23] [INF] [19] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for User1. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:55:23] [INF] [18] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: ffmpeg -analyzeduration 3000000 -probesize 1G -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" -i "http://192.168.11.167:8081/hls/stream.m3u8" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 2808000 -bufsize 5616000 -profile:v:0 high -level 40 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hex:open_gop=0 -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,scale=trunc(min(max(iw\,ih*a)\,1280)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -flags -global_header -codec:a:0 copy -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_base_url "hls/be540cba669e9c6b72f920948e2bb0da/" -hls_segment_filename "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\be540cba669e9c6b72f920948e2bb0da%d.ts" -hls_playlist_type event -hls_list_size 0 -y "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\be540cba669e9c6b72f920948e2bb0da.m3u8" [15:55:23] [INF] [20] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request [15:55:23] [INF] [20] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: ffmpeg -analyzeduration 3000000 -probesize 1G -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" -i "http://192.168.11.167:8081/hls/stream.m3u8" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 2808000 -bufsize 5616000 -profile:v:0 high -level 40 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hex:open_gop=0 -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,scale=trunc(min(max(iw\,ih*a)\,1280)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -flags -global_header -codec:a:0 copy -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_base_url "hls/f363b6d43ac053e3aa4c0e7ee518c78b/" -hls_segment_filename "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b%d.ts" -hls_playlist_type event -hls_list_size 0 -y "C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8" [15:55:25] [INF] [21] Emby.Server.Implementations.Library.MediaSourceManager: Live stream a30d2ab40a1c24c15fb07e9537d38205 consumer count is now 1 [15:55:25] [INF] [21] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 127.0.0.1 closed [15:56:25] [INF] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Transcoding kill timer stopped for JobId 1c07b8b920434f808e9f014860782de6 PlaySessionId b012804d40e74fa093a21a9a329516d9. Killing transcoding [15:56:25] [INF] [21] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8 [15:56:30] [INF] [21] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Killing FFmpeg process for C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8 [15:56:30] [INF] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) C:\Users\GPUVM\AppData\Local\jellyfin\cache\transcodes\f363b6d43ac053e3aa4c0e7ee518c78b.m3u8 [15:56:30] [ERR] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code -1 [15:56:32] [INF] [22] Emby.Server.Implementations.Library.MediaSourceManager: Live stream a30d2ab40a1c24c15fb07e9537d38205 consumer count is now 0 [15:56:32] [INF] [22] Emby.Server.Implementations.Library.MediaSourceManager: Closing live stream e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205 [15:56:32] [INF] [22] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: Closing LiveStream [15:56:32] [INF] [22] Emby.Server.Implementations.Library.MediaSourceManager: Live stream e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_a30d2ab40a1c24c15fb07e9537d38205 closed successfully [15:56:33] [ERR] [22] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL GET /videos/d8acb535-3c78-9ff7-5521-83be82bc5ee0/live.m3u8. MediaBrowser.Common.Extensions.ResourceNotFoundException: Exception of type 'MediaBrowser.Common.Extensions.ResourceNotFoundException' was thrown. at Emby.Server.Implementations.Library.MediaSourceManager.GetLiveStreamWithDirectStreamProvider(String id, CancellationToken cancellationToken) in C:\Users\GPUVM\Downloads\jellyfin-master\Emby.Server.Implementations\Library\MediaSourceManager.cs:line 793 at Jellyfin.Api.Helpers.StreamingHelpers.GetStreamingState(StreamingRequestDto streamingRequest, HttpContext httpContext, IMediaSourceManager mediaSourceManager, IUserManager userManager, ILibraryManager libraryManager, IServerConfigurationManager serverConfigurationManager, IMediaEncoder mediaEncoder, EncodingHelper encodingHelper, ITranscodeManager transcodeManager, TranscodingJobType transcodingJobType, CancellationToken cancellationToken) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Helpers\StreamingHelpers.cs:line 145 at Jellyfin.Api.Controllers.DynamicHlsController.GetLiveHlsStream(Guid itemId, String container, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 enableSubtitlesInManifest, Boolean enableAudioVbrEncoding, Boolean alwaysBurnInSubtitleWhenTranscoding) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Controllers\DynamicHlsController.cs:line 285 at lambda_method3055(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\ServerStartupMessageMiddleware.cs:line 41 at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\WebSocketHandlerMiddleware.cs:line 33 at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\IpBasedAccessValidationMiddleware.cs:line 49 at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\LanFilteringMiddleware.cs:line 37 at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\QueryStringDecodingMiddleware.cs:line 36 at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\RobotsRedirectionMiddleware.cs:line 43 at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\LegacyEmbyRouteRewriteMiddleware.cs:line 51 at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\ResponseTimeMiddleware.cs:line 66 at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) in C:\Users\GPUVM\Downloads\jellyfin-master\Jellyfin.Api\Middleware\ExceptionMiddleware.cs:line 55 [15:57:05] [INF] [17] Emby.Server.Implementations.Session.SessionManager: Sending shutdown notifications [15:57:05] [INF] [21] Main: Running query planner optimizations in the database... This might take a while [15:57:05] [INF] [22] Emby.Server.Implementations.IO.LibraryMonitor: Stopping directory watching for path C:\Users\GPUVM\Documents\Shows [15:57:05] [INF] [22] Emby.Server.Implementations.IO.LibraryMonitor: Stopping directory watching for path C:\Users\GPUVM\Documents\Filme [15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost [15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzArtistProvider [15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzAlbumProvider [15:57:05] [INF] [21] Emby.Server.Implementations.ApplicationHost: Disposing PluginManager ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 04:10:33 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6829