Fix Twitch VOD timestamps being offset by ~60 seconds - #18113
Merged
Conversation
Member
Yes, I think we should respect rebase-start-time here. Although, not sure if this is even correct semantic for rebase, but if it works, I guess we will see. |
Contributor
Author
|
This variant reads off the option when opening the edl playlist entry. That way, even if you change the rebase-start-time option while the entry is open, switching editions doesn't offset you by a minute. |
kasper93
approved these changes
Jun 14, 2026
kasper93
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks!
I haven't go deep into logic here, looks ok, we can improve if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for #14840
For the delay_open + no_clip case (ytdl_hook EDL), d_start is 0 because the stream wasn't opened yet. The added else if branch uses new->d->start_time directly, which is the actual start_time of the HLS demuxer that was just opened by reopen_lazy_segments().
Note though that even without this fix, the whole stream plays from start to finish, it's just the displayed timestamps that are incorrect. Also the problem only happens with the edl uris. If you directly mpv one of the m3u8 stream urls, it works correctly without this fix as well.
Idk if you'd want to check the rebase-start-time option here? It currently has no effect and the stream always starts at 0:00:00 with the fix, while it does work on the direct m3u8 uri.