plugin.video.vtm.go icon indicating copy to clipboard operation
plugin.video.vtm.go copied to clipboard

Subtitle drift

Open dagwieers opened this issue 4 years ago • 27 comments

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

dagwieers avatar Feb 29 '20 00:02 dagwieers

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)

michaelarnauts avatar Feb 29 '20 06:02 michaelarnauts

Recalculation of the subtitle timings is okay I think, but there is an issue with seeking: https://github.com/peak3d/inputstream.adaptive/issues/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://github.com/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

mediaminister avatar Feb 29 '20 09:02 mediaminister

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.

michaelarnauts avatar Feb 29 '20 17:02 michaelarnauts

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.

mediaminister avatar Feb 29 '20 22:02 mediaminister

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

michaelarnauts avatar Mar 01 '20 16:03 michaelarnauts

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 avatar Mar 01 '20 23:03 dagwieers

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?

michaelarnauts avatar Mar 06 '20 08:03 michaelarnauts

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.

basrieter avatar Mar 06 '20 08:03 basrieter

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 avatar Mar 06 '20 09:03 michaelarnauts

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

michaelarnauts avatar Mar 06 '20 09:03 michaelarnauts

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.

dagwieers avatar Mar 06 '20 11:03 dagwieers

This PR can be tested by installing this zip:

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

michaelarnauts avatar Mar 08 '20 18:03 michaelarnauts

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.

michaelarnauts avatar May 03 '20 05:05 michaelarnauts

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.

wardwygaerts avatar May 16 '20 22:05 wardwygaerts

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.

michaelarnauts avatar May 17 '20 08:05 michaelarnauts

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

mediaminister avatar May 17 '20 09:05 mediaminister

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.

wardwygaerts avatar May 21 '20 19:05 wardwygaerts

The issue with disappearing subtitles is fixed in https://github.com/peak3d/inputstream.adaptive/pull/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 https://github.com/add-ons/plugin.video.vtm.go/pull/183 gets merged, internal subtitles will always be selected if available, so the subtitle drift problem will be kept to a minimum.

mediaminister avatar May 26 '20 18:05 mediaminister

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?

WernerVermeylen avatar Aug 28 '20 08:08 WernerVermeylen

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 !

frankdpGH avatar Aug 29 '20 12:08 frankdpGH

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

michaelarnauts avatar Oct 11 '20 10:10 michaelarnauts

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)

dirkronsmans avatar Nov 17 '20 06:11 dirkronsmans

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 :) )

michaelarnauts avatar Nov 17 '20 15:11 michaelarnauts

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.

mediaminister avatar Nov 17 '20 16:11 mediaminister

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!

dirkronsmans avatar Nov 18 '20 07:11 dirkronsmans

Yes, 2.4.6.1 is the latest version for Leia.

On which program are you experiencing this subtitle problem?

mediaminister avatar Nov 18 '20 16:11 mediaminister

@mediaminister it might have been related to https://github.com/add-ons/plugin.video.vtm.go/pull/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.

dirkronsmans avatar Dec 30 '20 16:12 dirkronsmans