mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #16079] [CLOSED] Fix: Sync HLS playlist sequence with FFmpeg segment numbers #14514
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/16079
Author: @ZeusCraft10
Created: 1/21/2026
Status: ❌ Closed
Base:
master← Head:fix/hls-seek-infinite-buffering📝 Commits (1)
72eb47cFix: Sync HLS playlist sequence with FFmpeg segment numbers to prevent buffering on seek📊 Changes
5 files changed (+51 additions, -4 deletions)
View changed files
📝
Jellyfin.Api/Controllers/DynamicHlsController.cs(+14 -1)📝
src/Jellyfin.MediaEncoding.Hls/Playlist/CreateMainPlaylistRequest.cs(+8 -1)📝
src/Jellyfin.MediaEncoding.Hls/Playlist/DynamicHlsPlaylistGenerator.cs(+2 -2)📝
tests/Jellyfin.MediaEncoding.Hls.Tests/Jellyfin.MediaEncoding.Hls.Tests.csproj(+1 -0)📝
tests/Jellyfin.MediaEncoding.Hls.Tests/Playlist/DynamicHlsPlaylistGeneratorTests.cs(+26 -0)📄 Description
Hey team, I finally cracked that nasty HLS infinite buffering bug we've been seeing with Dolby Vision content! 🐛
The root cause was pretty tricky: when you seek, FFmpeg restarts and creates segment files starting from a new index (like 1187.mp4), but our server was still generating playlists starting at 0.mp4. The client would ask for segment 0, get a 404, and just spin forever.
This PR fixes it by:
Now the playlist URLs match the actual files on disk, so playback resumes instantly after seeking. 🚀
I've added a unit test to cover this case. Let me know what you think!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.