sftech13 29 Posted 5 hours ago Posted 5 hours ago One of my remote users had a playback failure near the end of a local movie on November 29. I checked the server and FFmpeg logs and found the following sequence. Can you review whether this is an HLS end-of-file/segment prediction issue? Setup at the time - Emby Server 4.10.2.0, native Ubuntu installation, .NET 8.0.28. - Ubuntu 24.04, kernel 7.0.0-43-generic, Intel Quick Sync available. - Client: Emby for Android 3.5.63 on a Fire TV identifying as AFTA, Android 7.1.2. - User: Brian. - Media: A Story of Derry (2026), a local MKV, 3840x2160 HEVC Main 10 with Dolby Vision/HDR10, approximately 20.9 Mbps. - Reported runtime: 1743.968 seconds (29:03.968). - The remote playback limit was 6 Mbps. Requests show ContainerBitrateExceedsLimit and a 1080p transcode, with video bitrate 5,360,000 and audio bitrate 640,000. Timeline (November 29, 2026, Pacific Standard Time, UTC-8) - 19:51:45: Playback/transcoding starts. - 19:54:09: Audio/subtitle selections change (audio index 1 to 2; subtitle index 3 to 5). A replacement transcode starts around playback position 1:52. - 20:12:14: That encode has reached EOF ahead of playback. FFmpeg's final video segment is B6BEA2_580.ts: SegmentComplete=video:0 Index=580 Start=1741.656533 End=1743.950500 Duration=2.293967 Frames=55 - 20:20:30.506: GET /emby/videos/77031745/hls1/main/580.ts returns HTTP 200 in 3 ms. - 20:20:33.497: The client requests /emby/videos/77031745/hls1/main/581.ts. The completed encode did not report producing this video segment. - 20:21:03.656: The initial request completes after the client disconnects, after 30,159 ms. Additional retries include similar 30-second waits. - 20:21:19.343 and 20:21:21.581: Requests for 581.ts return HTTP 500 (15,713 ms and 866 ms). - 20:21:54: The client asks for PlaybackInfo at StartTimeTicks=17437400000 (29:03.740), with DirectPlayError added to the transcode reasons, then requests the tail segment again. - 20:22:40.198 and 20:22:42.374: Two more 581.ts requests return HTTP 500 (15,247 ms and 866 ms). - 20:24:24.572: The client finally reports playback stopped, playing an Unnamed item. What the failed retries show - Emby starts new FFmpeg attempts with -ss 00:29:03.000 and segment_start_number 581. - Hardware and software attempts do not recover the tail segment. Some log: Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory Error initializing output stream 0:0 encoded 0 frames Conversion failed! - Some aborted retries exit 137 after client disconnects and server stop commands. I found no matching kernel OOM event; I am not treating 137 alone as proof of an OOM kill. - Dolby Vision/RPU parsing warnings also appear in failed retries. I cannot establish whether those are causal or secondary. Why I suspect the segment prediction/end handling The recorded final video segment 580 already covers the media through 1743.9505 seconds, but the player asks for 581. A nominal 3-second prediction over a declared runtime of 1743.968 seconds produces 582 entries (0-581); actual generated segment boundaries differ. I do not have the historical main.m3u8 response body, so please treat the exact playlist content as an inference, not a captured response. There appears to be a similar report here: https://emby.media/community/topic/149368-hls-segment-list-is-computed-from-the-containers declared duration-and-is-never-checked-against-the-media/ Other checks - Segments up to 580 were being delivered successfully. There are 600 successful main-video-segment responses and four HTTP 500 responses in the inspected 19:50-20:25 window, including requests before/after the track change. - Around the failure the host was about 96% CPU idle, with about 27 GiB of available RAM. Other clients continued sending successful playback updates. - No matching kernel OOM, GPU-hang or storage-reset/error entries were found in the checked window. - These are historical logs, not a fresh controlled reproduction. I do not have a client debug log from that session. - An unrelated Emby-only MALLOC_ARENA_MAX=8 trial was activated November 30 at 10:25 PST, AFTER this incident. It was not enabled during the failure. I attached complete server logs covering startup/track change and the failure, plus the relevant FFmpeg logs. Can you confirm whether the extra tail request and its retry behavior match a known issue, and whether there is a supported fix or a specific diagnostic you need next? embyserver-63931579524.txt embyserver-63931586724.txt ffmpeg-transcode-4df9726e-6686-4228-98a1-f04a2b2c45f7_1.txt ffmpeg-transcode-5d3f3c55-2d32-4874-8542-4d46c45538e3_1.txt ffmpeg-transcode-9d844860-459c-42a6-b9c1-0706355fe54e_1.txt ffmpeg-transcode-046cc394-9e74-4087-8e83-2b461b32a57d_1.txt ffmpeg-transcode-899213f0-ab61-418e-957f-8a6e81c9d4c5_1.txt ffmpeg-transcode-dfd0631c-1692-43f2-bf59-bcd83501ee41_1.txt ffmpeg-transcode-e3417d8f-b7be-49ed-9018-b7959fdc4183_1.txt
Luke 43745 Posted 5 hours ago Posted 5 hours ago hi, on a full transcode, the manifest will usually be accurate and not predicted. One thing I spotted recently is that the last segment may have its duration over-reported at the generic 3s if it's a partial segment. Although that's probably not the cause of the issue. Anyhow, there are improvements to hardening this on the server beta channel, as well as the new ffmpeg build, Either of those things could have an impact on this. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now