Skip to content

Fix Twitch VOD timestamps being offset by ~60 seconds - #18113

Merged
kasper93 merged 1 commit into
mpv-player:masterfrom
Mikachu:pr/twitch-edl
Jun 14, 2026
Merged

Fix Twitch VOD timestamps being offset by ~60 seconds#18113
kasper93 merged 1 commit into
mpv-player:masterfrom
Mikachu:pr/twitch-edl

Conversation

@Mikachu

@Mikachu Mikachu commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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.

@kasper93

Copy link
Copy Markdown
Member

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.

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.

@Mikachu

Mikachu commented Jun 13, 2026

Copy link
Copy Markdown
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 kasper93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I haven't go deep into logic here, looks ok, we can improve if needed.

@kasper93
kasper93 merged commit 662d410 into mpv-player:master Jun 14, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants