Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitle drift #148

Open
dagwieers opened this issue Feb 29, 2020 · 27 comments · Fixed by #154
Open

Subtitle drift #148

dagwieers opened this issue Feb 29, 2020 · 27 comments · Fixed by #154
Labels
bug Something isn't working fixed A fix is available upstream but not yet released inputstream-adaptive This bug needs a fix in InputStream Adaptive. vtmgo This issue relates to VTM GO

Comments

@dagwieers
Copy link
Collaborator

Describe the bug
I have seen this almost every time, the subtitles drift over time and appear later than expected.
It feels related to the ads/periods as if the recalculation was not performed exactly correct.

System

  • Addon version: v0.9.4
  • Kodi version: v18.5
  • Inputstream adaptive version: v2.4.3.1
  • Operating System: LibreELEC v9.2.0
  • Special Hardware: Raspberry Pi 3B
@michaelarnauts
Copy link
Collaborator

I've also noticed this, and sometimes you can select a different subtitle track (the one embedded in the stream I guess) that works fine. I haven't looked into this, maybe all streams have embedded subs now so we don't need to modify the external webvtt anymore.

Seeking 5 seconds backwards also sometimes solves it (what makes me think it'd an issue in Kodi or Inputstream who reports wrong timings)

@mediaminister
Copy link
Contributor

Recalculation of the subtitle timings is okay I think, but there is an issue with seeking: xbmc/inputstream.adaptive#324

There is also an embedded subtitle available, but last time I checked the complete subtitle is embedded in the first period. (peak3d confirmed this: https:/michaelarnauts/plugin.video.vtm.go/issues/51#issuecomment-534874758) This is problematic when playing multiple consecutive periods.

I'm not sure if the embedded subtitle complies to MPEG DASH standards, this needs to be investigated and depending on the outcome, this must be fixed by VTM or in InputStream Adaptive

@michaelarnauts
Copy link
Collaborator

I've seen the last few episodes of The Voice Kids, and after an advertisement, the timing was off, when I selected the 2nd subtitle stream, it was right. I assume the first one was the recalculated, and the 2nd was the embedded stream.

@mediaminister
Copy link
Contributor

Aha, then it's quite possible that VTM has changed the embedded subtitle streams the past months, I didn't check this yet. Maybe the current implementation with external subtitles is no longer needed.
Maybe adding an option in the settings to turn recalculation and external subtitles off is a good idea.

@michaelarnauts
Copy link
Collaborator

I've did some quick testing, and there are some programs with a correct Dutch subtitle track in the stream, but also some where I notice that only the first segment has subtitles.

Seems correct:

  • The voice Kids
  • Wat als (also old seasons)
  • Make Belgium great again

Seems to have no subtitles in other segments:

  • 13 Geboden

@dagwieers
Copy link
Collaborator Author

I can confirm this. So at least there is an easy workaround for now.
Can we pin this issue from the top of the GitHub issues page?

@dagwieers dagwieers added the bug Something isn't working label Mar 2, 2020
@dagwieers dagwieers pinned this issue Mar 5, 2020
@dagwieers dagwieers added the vtmgo This issue relates to VTM GO label Mar 5, 2020
@michaelarnauts
Copy link
Collaborator

I've found this commit in the retrospect code that indicates that activating subtitles trough setSubtitles() could cause sync issues.

@basrieter could you elaborate on this, could this be related to this issue?

@basrieter
Copy link

Indeed, I had similar issues with the combination of InputStream Adaptive and the ListItem.setSubtitles() on the method. That is why I reverted that change to use Player.setSubtitles(). I didn't look into the source of the issue.

@michaelarnauts
Copy link
Collaborator

Indeed, I had similar issues with the combination of InputStream Adaptive and the ListItem.setSubtitles() on the method. That is why I reverted that change to use Player.setSubtitles(). I didn't look into the source of the issue.

Okay, now that I setup a player and wait for it to start, I could also do this after the player has started and then add the subtitle quite easily.

@dagwieers Does VRT NU also use inputstream, because I think you also set it on the ListItem there?

@michaelarnauts
Copy link
Collaborator

#154 does this change, but I haven't got around to test this.

@dagwieers
Copy link
Collaborator Author

I don't think I have seen subtitle drift for VRT NU. But we don't have periods (which seems to affect this drift). There is an expected delay for live events (like soccer games), but that is not drift.

@michaelarnauts
Copy link
Collaborator

This PR can be tested by installing this zip:

plugin.video.vtm.go-1.0.0-148-delay-adding-subtitles-fd70581.zip

@michaelarnauts
Copy link
Collaborator

This has been merged, but I don't see any differences with the changes proposed by @basrieter

I think I prefer to set the subtitles on the ListItem then, but we still need the Player to wait to enable the subtitles.

@wardwygaerts
Copy link

I almost never watch VTM go with subs, but for The Team I needed them (German & Dannish), and after some time the subs completely disapeared. After stopping and resuming the episode everything was back ok. We switched over to the vtm go app + Chromecast, but here I also noticed that the subs aren't completely in sync all the time.

@michaelarnauts
Copy link
Collaborator

I noticed today that the advertisements are also subtitled. I'm thinking to fix this issue by only using the external subtitle if explicitly enabled.

But even with the calculations we make, it should still work, so I don't know why that the calculated subtitles are out of sync.

@mediaminister
Copy link
Contributor

@wardwygaerts It would help if you specified in which episode and at what timecode the problem occurred.

@wardwygaerts
Copy link

I only watched the two first eps of S2 via the addon (the other ones via app & chromecast). I tried to find where it happened, but when skipping through the episode, I can't reproduce the issue.

@mediaminister
Copy link
Contributor

mediaminister commented May 26, 2020

The issue with disappearing subtitles is fixed in xbmc/inputstream.adaptive#456
So, we have to wait for a new InputStream Adaptive version.

The subtitle drift issue is not fixed yet, but only occurs with external subtitles.
When #183 gets merged, internal subtitles will always be selected if available, so the subtitle drift problem will be kept to a minimum.

@dagwieers dagwieers added the inputstream-adaptive This bug needs a fix in InputStream Adaptive. label May 26, 2020
@dagwieers dagwieers added the fixed A fix is available upstream but not yet released label May 26, 2020
@WernerVermeylen
Copy link

I've also noticed the subtitles disappear, usually after some commercials. Stop+restart the episode works for a minute (or less) but then they disappear again. I have this issue with Kodi Matrix (Alpha 1) on AndroidTV.
Reading the comments I assume I will have to wait for the inputstream.adaptive issue to be fixed and merged?

@frankdpGH
Copy link

Hi Werner, I confirm the same annoying behavior of loosing the subtitles. Hoping for an update soon. @Developers : many thanks for spoiling the Flemish tv watcher with these add-ons !

@michaelarnauts
Copy link
Collaborator

I've noticed when watching snackmasters, that the subtitles don't match at all. I haven't looked at this in detail yet.

@dirkronsmans
Copy link

dirkronsmans commented Nov 17, 2020

Not sure if it's the same/related and if not I'll open a new issue but I notice that when I watch a show and I enable the embedded stream, then a commercial comes on, I need to re-select a different stream.
Is this a bug or is this something that can be automatically done? (sounds like what Werner has)

@michaelarnauts
Copy link
Collaborator

Not sure if it's the same/related and if not I'll open a new issue but I notice that when I watch a show and I enable the embedded stream, then a commercial comes on, I need to re-select a different stream.
Is this a bug or is this something that can be automatically done? (sounds like what Werner has)

I think this is a bug. We have code that makes sure a subtitle is selected when the playback starts. It is probably executed also after an advertisement and selecting the external subtitle stream. Feel free to open a new bug for this.

(@dirkronsmans I think we went to the same school, at least, I remember your name :) )

@mediaminister
Copy link
Contributor

mediaminister commented Nov 17, 2020

Please specify which InputStream Adaptive version you are using. You definitely need the latest version which contains a couple of fixes!
And please specify which program suffers from a possible subtitle bug.

We need a new issue for this, because a lot has changed since @dagwieers opened this issue.

@dirkronsmans
Copy link

dirkronsmans commented Nov 18, 2020

Hi @mediaminister that would be v 2.4.6.1 (from the CoreElec repo) going by the peak3d repo I'm way behind.
Not sure whether I can just update from another repo (using an Odroid-N2)?

edit: nvm. 2.4.6.1 seems to be the latest for Kodi Leia (running 18.9 atm)

and yes @michaelarnauts!, same school even did our internship together :) I was happy to see you developing this!

@mediaminister
Copy link
Contributor

Yes, 2.4.6.1 is the latest version for Leia.

On which program are you experiencing this subtitle problem?

@michaelarnauts michaelarnauts unpinned this issue Dec 8, 2020
@dirkronsmans
Copy link

@mediaminister it might have been related to #248
Because I remember the shows having 2 subtitles and I had to switch between them after a commercial break. If I encounter it again I'll just open another issue for it so we can troubleshoot this in it's own issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed A fix is available upstream but not yet released inputstream-adaptive This bug needs a fix in InputStream Adaptive. vtmgo This issue relates to VTM GO
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants