shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.11k stars 1.33k forks source link

Shaka 4.6.16 doesn't show WebVTT subtitles #6448

Closed TommiRautanen closed 2 months ago

TommiRautanen commented 5 months ago

Have you read the FAQ and checked for duplicate open issues? Yes

If the problem is related to FairPlay, have you read the tutorial?

Not related

What version of Shaka Player are you using?

Works fine with 4.3.4, but not with 4.6.16 / 4.7.12

Can you reproduce the issue with our latest release version? I'm using Shaka in Chromecast so 4.7.12 is the latest I'm able to try out.

Can you reproduce the issue with the latest code from main?

Are you using the demo app or your own custom app? Custom Chromecast receiver

If custom app, can you reproduce the issue using our demo app?

What browser and OS are you using? Chromecast

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

Example of failing WebVTT content:

WEBVTT
X-TIMESTAMP-MAP=MPEGTS:2627320000,LOCAL:00:00:00.000

902788007
00:00:02.320 --> 00:00:03.840
-Aja jo!
-Paljonko saimme?

What configuration are you using? What is the output of player.getConfiguration()?

Default config.

What did you do?

Start playing live content. With Shaka 4.3.4 subtitles are showing up, with 4.6.16 / 4.7.12 they are not.

What did you expect to happen? Subtitles should show up.

What actually happened?

Cues are not being updated to videoElement:

Screenshot 2024-04-16 at 8 19 30
joeyparrish commented 5 months ago

Quoting the issue template:

**What are the manifest and license server URIs?**
<!-- NOTE:
  You can send the URIs to <shaka-player-maintainers@googlegroups.com> instead,
  but please use GitHub and the template for the rest.
  A copy of the manifest text or an attached manifest will **not** be
  enough to reproduce your issue, and we **will** ask you to send a
  URI instead.
TommiRautanen commented 5 months ago

@joeyparrish sorry, this is DRM protected stream so cannot provide manifest URL. But issue is with HLS CMAF stream + WebVTT subtitles.

HLS TS works OK.

avelad commented 5 months ago

Since you cannot provide a test stream, we cannot help you further. If you want to debug the issue yourself and create a PR, we will be happy to review it.

shaka-bot commented 5 months ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

CarlLindqvist commented 5 months ago

I managed to recreate it for VOD when snipping from a live stream. The live stream uses UTC timecode, and my guess is that Shaka doesn't translate the WebVTT timecodes correctly because of TS rollover. Maybe because of the work done in https://github.com/shaka-project/shaka-player/issues/6320

Here is a test stream: https://downloads.a2d.tv/subsissue/subsissue.m3u8

CarlLindqvist commented 5 months ago

@shaka-bot reopen

TommiRautanen commented 5 months ago

@shaka-bot reopen

TommiRautanen commented 5 months ago

@avelad can you reopen this one?

SebastianLjungman commented 5 months ago

Could also possibly be related to https://github.com/shaka-project/shaka-player/pull/6388? Both this and https://github.com/shaka-project/shaka-player/issues/6320 were included in the same releases 4.6.16 / 4.7.12

avelad commented 4 months ago

@CarlLindqvist your stream/subtitles works fine with manifest.hls.sequenceMode=false, so there are a problem with manifest.hls.sequenceMode=true (default config)

friday commented 2 months ago

I bisected this, and it was introduced in 9ab54d1. Reverting this in main works to fix the issue too, but I don't know enough about the transmuxing and vtt parsing to propose a proper solution.

avelad commented 2 months ago

@friday Let me check, and if necessary I will reintroduce the changes.

avelad commented 2 months ago

@friday PR: https://github.com/shaka-project/shaka-player/pull/7104 Thanks for your help!