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

Multitrack audio video text rebased #691

Conversation

dsparacio
Copy link
Contributor

This is a PR that includes all of PR #662, as well as the new multi text track support rebased on the current dev branch as of this morning.

There was one conflict that caused multi text support to fail
b6fd76b
so I reverted one line of code of which the resolution is being actively discussed
0355ce7 & #690.
@bbcrddave now we can fix this on top of the multi track work....

I will be mounting a version of our support player using video.js with mutli-text-track samples that will demo both external xml and fragmented text tracks. It can be found here:
http://mediapm.edgesuite.net/dash/private/support-player/nightly/v1.5/index.html

Once merged, I will submit another PR with a simple HTML sample as well as update the ref player index.html

PS The above demo url may not be up until later tonight or in morning.

@dsparacio
Copy link
Contributor Author

Update.. My CI nightly build machine is down so the demo will be up in the morning.

@dsparacio dsparacio force-pushed the multitrack-audio-video-text-rebased branch from 889d87a to 58f1959 Compare August 6, 2015 18:42
@dsparacio
Copy link
Contributor Author

@bbcrddave - I pulled in ALL the active PR related and now everything works as expect. Thanks a bunch for work and the feedback. Please review this change if you have time. Ill un-merged until next week.

Dan Sparacio added 2 commits August 6, 2015 15:26
Fixed issue found when trying to hide captions and then turn back on.
createTextTrackFromMediaInfo(null, this.mediaInfos[i]);
}
self.videoModel.getElement().textTracks.addEventListener('change', onTextTrackChange.bind(self));
this.timescale = fragmentExt.getMediaTimescaleFromMoov(bytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timescale can be NaN - it is used in a number of calculations which could subsequently return NaN. addCaptions definitely doesnt check for this, there may be other places too.

I note that you've actually improved on the existing code by doing something sensible in getMediaTimescaleFromMoov, but it's worth considering.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the timescale always returns NaN unless it is the initial segment in which I extract the value only once at that time. Not sure what a better way to do this would be. Any suggestions.

Also talking to EBU about EBU-TT it seems that we should use DTS not CTS for the start times. Any opinion on this topic?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it should be DTS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it is DTS.

However I see no advantage for this application in using composition time offsets in the BMFF, so it's likely that ctts=0, in which case DTS=CTS. I wouldn't rely on ctts being zero though - just use DTS.

@davemevans
Copy link
Contributor

@AkamaiDASH, great work! I've stuck a few comments inline but on the whole this is awesome.

@dsparacio
Copy link
Contributor Author

@bbcrddave - Thank you so much for the in-depth code review and comments!! Addressing some now.

Also cache parser instance locally (only for fragmented text) to avoid going to system each chunk to get TTMLParser… 
Few vars set back to default in abort as well.
@dsparacio
Copy link
Contributor Author

Cross reference PR #662 which is being closed. This PR is everything in #662 plus Multi Text Track support rebased on current dev. Please see #662 for comment history and feedback.

dsparacio pushed a commit that referenced this pull request Aug 12, 2015
…ebased

Multitrack audio video text rebased
@dsparacio dsparacio merged commit 8b045c7 into Dash-Industry-Forum:development Aug 12, 2015
@@ -270,6 +278,8 @@ MediaPlayer = function (context) {
doAutoPlay.call(this);
}
}

this.adapter.reset();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AkamaiDASH @KozhinM This line is causing some problems for me. We are resetting the manifest adapter after we call doAutoPlay(). This causes the adapter to be reset after it has been initialized with data from the new manifest. Can I move this line into the if (!resetting) block so that it is only reset when the reset of the system objects are reset?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greg80303, let me explain why I put adapter.reset in this method - MediaPlayer now has getStreamsFromManifest and getTracksForTypeFromManifest methods that use DashAdapter's methods that in turn initialize adapter's periods and adaptations members. If these methods are called for a manifest A and then MediaPlayer.attachSource is called for a manifest B w/o resetting the adapter it will have incorrect data about periods and adaptations. That is why I reset adapter in resetAndPlay.

I think we need to move adapter.reset right at the top of the resetAndPlay function Since 'playing' and 'streamControllers' may not be set in case I described above. Does it make sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KozhinM I'm fine with moving it to the top. As long as it is called before doAutoPlay.call(this).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KozhinM Fixed with 749518f

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greg80303, thanks!

}
}else {
streamProcessor.updateMediaInfo(manifest, allMediaForType[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AkamaiDASH, I believe this line breaks the adaptation switch process since it forces the player to always pick the first adaptation instead of the one passed as an argument. I created a PR with a fix, but before merging it I want to get your confirmation that it does not confront with your intentions that I am not aware of:
#700
After review, if you think that everything is fine, could you please merge the PR since the fixes that it includes are quite important.

@dsparacio dsparacio deleted the multitrack-audio-video-text-rebased branch September 2, 2015 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants