Subtitles fail to continue after a period without a subtitle representation

119 views
Skip to first unread message

john....@verizondigitalmedia.com

unread,
Mar 22, 2017, 4:46:28 PM3/22/17
to Shaka Player Users
Hello all.  I am trying to determine the best course of action to solve a problem we have with dynamic ad insertion into a stream whose primary asset has text track representations while the inserted ads do not have a text track representation.

Currently while trying to do this shaka will play subtitles fine until the end of the first period.  Then we insert an asset which has no subtitles for the second period.  Near the end of that period shaka logs an assertion (presumably as it begins handling subtitles from the soon to begin third period) :

"Assertion failed: There should not be a gap in text references >1s

(anonymous) @ text_engine.js:183"


After which subtitles are no longer rendered.


This assertion seems to suggest that shaka does not expect or handle the kind of asset we have generated where an entire period is simply without a text track representation.

The use case seems reasonable enough though.  If you are viewing an video that has subtitles and you wanted to insert an ad, that ad could easily be lacking subtitles.

Do you have any thoughts on how shaka could or should handle this particular case OR any other thoughts (like perhaps... Don't do that!).

I am currently working in the shaka demo app, and I have added just a bit to the assets.js to advertise my asset and handle the license request/response to/from our widevine license proxy.  I created a small diff of these changes if you want to apply the diff and see the issue in action (if that is necessary).  Find the diff attached -- I updated my repo this morning, so I think it should apply pretty cleanly with the patch command if you have no local changes to your demo/assets.js file.

--
John Bowers
VDMS Engineering

assets.js.diff

Joey Parrish

unread,
Mar 22, 2017, 5:58:39 PM3/22/17
to Shaka Player Users
Hi John,

I believe we've recently fixed this.  What version of Shaka Player are you using?  Can you try with the latest version from the master branch?

Thanks,
Joey


--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/5374694a-a5ce-4a74-8b96-6af9ec877486%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacob Trimble

unread,
Mar 22, 2017, 6:07:02 PM3/22/17
to shaka-pla...@googlegroups.com
Actually, this was not fixed recently.  The problem is that the later Periods don't have the correct cue times.  The assert can be ignored since it doesn't affect playback (and should be updated).  However, the MP4 VTT parser is bad since it isn't using the offset passed in.  This makes all the parsed cues be relative to the Period instead of being absolute.  We'll work on fixing it right away.

On Wed, Mar 22, 2017 at 2:58 PM, 'Joey Parrish' via Shaka Player Users <shaka-pla...@googlegroups.com> wrote:
Hi John,

I believe we've recently fixed this.  What version of Shaka Player are you using?  Can you try with the latest version from the master branch?

Thanks,
Joey

On Wed, Mar 22, 2017 at 1:46 PM, <john.bowers@verizondigitalmedia.com> wrote:
Hello all.  I am trying to determine the best course of action to solve a problem we have with dynamic ad insertion into a stream whose primary asset has text track representations while the inserted ads do not have a text track representation.

Currently while trying to do this shaka will play subtitles fine until the end of the first period.  Then we insert an asset which has no subtitles for the second period.  Near the end of that period shaka logs an assertion (presumably as it begins handling subtitles from the soon to begin third period) :

"Assertion failed: There should not be a gap in text references >1s

(anonymous) @ text_engine.js:183"


After which subtitles are no longer rendered.


This assertion seems to suggest that shaka does not expect or handle the kind of asset we have generated where an entire period is simply without a text track representation.

The use case seems reasonable enough though.  If you are viewing an video that has subtitles and you wanted to insert an ad, that ad could easily be lacking subtitles.

Do you have any thoughts on how shaka could or should handle this particular case OR any other thoughts (like perhaps... Don't do that!).

I am currently working in the shaka demo app, and I have added just a bit to the assets.js to advertise my asset and handle the license request/response to/from our widevine license proxy.  I created a small diff of these changes if you want to apply the diff and see the issue in action (if that is necessary).  Find the diff attached -- I updated my repo this morning, so I think it should apply pretty cleanly with the patch command if you have no local changes to your demo/assets.js file.

--
John Bowers
VDMS Engineering

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.

john....@verizondigitalmedia.com

unread,
Mar 22, 2017, 6:23:23 PM3/22/17
to Shaka Player Users
Ok.  Well that is good to know.  Let me know when you have something in and I will be happy to test it out.  Thanks!


On Wednesday, March 22, 2017 at 4:07:02 PM UTC-6, Jacob Trimble wrote:
Actually, this was not fixed recently.  The problem is that the later Periods don't have the correct cue times.  The assert can be ignored since it doesn't affect playback (and should be updated).  However, the MP4 VTT parser is bad since it isn't using the offset passed in.  This makes all the parsed cues be relative to the Period instead of being absolute.  We'll work on fixing it right away.
On Wed, Mar 22, 2017 at 2:58 PM, 'Joey Parrish' via Shaka Player Users <shaka-pla...@googlegroups.com> wrote:
Hi John,

I believe we've recently fixed this.  What version of Shaka Player are you using?  Can you try with the latest version from the master branch?

Thanks,
Joey

On Wed, Mar 22, 2017 at 1:46 PM, <john....@verizondigitalmedia.com> wrote:
Hello all.  I am trying to determine the best course of action to solve a problem we have with dynamic ad insertion into a stream whose primary asset has text track representations while the inserted ads do not have a text track representation.

Currently while trying to do this shaka will play subtitles fine until the end of the first period.  Then we insert an asset which has no subtitles for the second period.  Near the end of that period shaka logs an assertion (presumably as it begins handling subtitles from the soon to begin third period) :

"Assertion failed: There should not be a gap in text references >1s

(anonymous) @ text_engine.js:183"


After which subtitles are no longer rendered.


This assertion seems to suggest that shaka does not expect or handle the kind of asset we have generated where an entire period is simply without a text track representation.

The use case seems reasonable enough though.  If you are viewing an video that has subtitles and you wanted to insert an ad, that ad could easily be lacking subtitles.

Do you have any thoughts on how shaka could or should handle this particular case OR any other thoughts (like perhaps... Don't do that!).

I am currently working in the shaka demo app, and I have added just a bit to the assets.js to advertise my asset and handle the license request/response to/from our widevine license proxy.  I created a small diff of these changes if you want to apply the diff and see the issue in action (if that is necessary).  Find the diff attached -- I updated my repo this morning, so I think it should apply pretty cleanly with the patch command if you have no local changes to your demo/assets.js file.

--
John Bowers
VDMS Engineering

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

Jacob Trimble

unread,
Mar 22, 2017, 7:19:28 PM3/22/17
to shaka-pla...@googlegroups.com
We just pushed a fix for the problem.  It should be fixed with the latest from master.  I notice that the cues are slightly off, but I think that you need to update the times in the media.

On Wed, Mar 22, 2017 at 3:23 PM, <john....@verizondigitalmedia.com> wrote:
Ok.  Well that is good to know.  Let me know when you have something in and I will be happy to test it out.  Thanks!

On Wednesday, March 22, 2017 at 4:07:02 PM UTC-6, Jacob Trimble wrote:
Actually, this was not fixed recently.  The problem is that the later Periods don't have the correct cue times.  The assert can be ignored since it doesn't affect playback (and should be updated).  However, the MP4 VTT parser is bad since it isn't using the offset passed in.  This makes all the parsed cues be relative to the Period instead of being absolute.  We'll work on fixing it right away.
On Wed, Mar 22, 2017 at 2:58 PM, 'Joey Parrish' via Shaka Player Users <shaka-pla...@googlegroups.com> wrote:
Hi John,

I believe we've recently fixed this.  What version of Shaka Player are you using?  Can you try with the latest version from the master branch?

Thanks,
Joey

On Wed, Mar 22, 2017 at 1:46 PM, <john....@verizondigitalmedia.com> wrote:
Hello all.  I am trying to determine the best course of action to solve a problem we have with dynamic ad insertion into a stream whose primary asset has text track representations while the inserted ads do not have a text track representation.

Currently while trying to do this shaka will play subtitles fine until the end of the first period.  Then we insert an asset which has no subtitles for the second period.  Near the end of that period shaka logs an assertion (presumably as it begins handling subtitles from the soon to begin third period) :

"Assertion failed: There should not be a gap in text references >1s

(anonymous) @ text_engine.js:183"


After which subtitles are no longer rendered.


This assertion seems to suggest that shaka does not expect or handle the kind of asset we have generated where an entire period is simply without a text track representation.

The use case seems reasonable enough though.  If you are viewing an video that has subtitles and you wanted to insert an ad, that ad could easily be lacking subtitles.

Do you have any thoughts on how shaka could or should handle this particular case OR any other thoughts (like perhaps... Don't do that!).

I am currently working in the shaka demo app, and I have added just a bit to the assets.js to advertise my asset and handle the license request/response to/from our widevine license proxy.  I created a small diff of these changes if you want to apply the diff and see the issue in action (if that is necessary).  Find the diff attached -- I updated my repo this morning, so I think it should apply pretty cleanly with the patch command if you have no local changes to your demo/assets.js file.

--
John Bowers
VDMS Engineering

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.

john....@verizondigitalmedia.com

unread,
Mar 23, 2017, 11:40:04 AM3/23/17
to Shaka Player Users
Yeah, the fix looks good.  There are indeed some VTT timing issues in that media.  We actually have it fixed in our content generation tool ... Just not in that particular piece of content ;)  -- Thanks for responding so quick to this issue.

-- John
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages