-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Possible Bug: Load WebVTT (.vtt) subtiles in Dynamic Live MPD via SegmentTemplate #4264
Comments
Can you share the stream? Does this link to an external WebVTT file or is WebVTT included in ISOBMFF segments? |
Hello @dsilhavy! It links to external WebVTT file |
Thanks for your help. |
Our reference content for external WebVTT files does not define a I took a brief look at the IOP guidelines, and they only mention the I need to check this in more detail, but probably your content would work as exptected if you remove |
Hello @dsilhavy! Thanks for your quick response and help with fixing this. I updated the MPD to not include the |
@MBS9 I looked at your MPD. I think the problem is that you are using As you are linking to an external subtitle file in your MPD this format should work: <AdaptationSet mimeType="text/vtt" lang="en">
<Representation id="caption_zxx" bandwidth="256">
<BaseURL>https://us-central1-envelop-stream-dev.cloudfunctions.net/getDynamicVtt?url=https%3A%2F%2Fcompositions.s3.us-west-2.amazonaws.com%2Fenvelop%2Fsmaller-Sexoid%2520E4L%2Foutput.vtt&startTimeSecs=1295160</BaseURL>
</Representation>
</AdaptationSet> Can you modify the MPD accordingly? In the catch block of |
Hello @dsilhavy Thanks for your help! I updated the MPD as requested. Unfortunately, it still doesn't quite do what we want it to do. While the error is no longer present, as new periods are added to the Dynamic MPD the subtitles don't work on the newly added periods. They only work when we are playing a period which was present when the MPD was first requested. So, for example, if the MPD has periods 1 and 2 when first being requested, then periods 1 and 2 will play without issues. When more periods are added after the stream has started (say period 3 is also added), then for period 3, the audio will play but the subtitles won't. Same happens for periods 4,5,6..... as they are added. (In case this affects the debugging: We remove the old periods once they finished playing to keep the size of the MPD smaller) Thanks, a lot, in advance! |
Hello @dsilhavy ! I am now going to revert the MPD back to using the Below are 3 pastebins of the MPD before the revert (so with Thanks! |
@MBS9 Can you check if your |
Hello @dsilhavy ! The Let me know if with this change in the reference client we should consider this issue Thanks for your help again! |
Perfect, thanks for testing. I close this issue then. |
Hello all!
I have an Live Dynamic MPD which includes the following tags:
When this tag is removed everything works well (apart of course that the subtitles are not displayed), but when this tag is added dash.js says
Error creating source buffer of type : text
.I traced this bug and found that if I change this if statement from
if (codec.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))
toif (codec.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i) || codec.match(/text/)))
the issue resolves and the subtitles are displayed correctly.It seems like WebVTT (.vtt) files require a text buffer, but when this buffer is created, dash.js doesn't create a text buffer but instead uses the same buffer which would be used for audio/video (which does not support text). This seems to cause an error. That above linked statement seems to filter out the codecs which require this text buffer (which are subtitles), but it doesn't catch the
vtt
since its MIME Type istext/vtt
notapplication/mp4
. By adding the check for the codec to match the regex "text", the vtt subtitles (since our file has MIME Typetext/vtt
) are now caught and the correct buffer is created for it.If the dash.js team agrees that this is a bug, I would love to open a PR to fix this.
The text was updated successfully, but these errors were encountered: