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
Update audio track switch #2151
Update audio track switch #2151
Conversation
54fd306
to
e90b21e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to fix the problem of switching audio language. At least for the test asset we have.
This looks like a real solution to the issue. I tested with the asset in #1928 and it works really well to switch audio language with this fix. |
Sorry, I am testing this branch and I am seeing a weird behavior. As pointed out by @TobbeEdgeware, with the applied changes playback doesn't stop after switching audio tracks and it seems to work (with those "nice" beep!... beep!...). However, if you take a look at segment requests, even after switching from track #1 to track #2, most of requests are done for segments that belong to the track #1. When switching from audio track #1 to audio track #2 I see just 1-2 requests for segments of track #2 and then, next ones are for segments of track #1. Similar thing happen if you select audio track #2 and restart playback (to force playback to start with audio track #2). I have checked that segment requests are working fine in latest version of Dash.js and in nightly builds (although not usable because playback is stalled). So, at least I am missing something, I guess there is some pending work to do to really fix this. I haven't taken a look myself to the code related with this yet but, intuitively, looking at how player behaves with dashjs 2.6 when there is an audio track switch and playback is stalled seems like a video/audio sync issue (timestamp alignment?). Just a thought, didn't have the time to verify that. |
e90b21e
to
79fdb59
Compare
Hi, you're right @epiclabsDASH , there is still some strange behaviors. I'm working on it. It would be interesting to have a Dash stream with SegmentTimeline and at least two real audio tracks with different codecs : is someone can provide it to me? Thanks, |
The problem is in validateExecutedFragmentRequest function of ScheduleController. if isCurrentTrack equals false (for instance when an audio track has changed) the last loaded request is added to replaceRequest Array. So, the request will be downloaded again for the new AdaptationSet without loading an init segment. |
…h time scheduleController is started.
…ack switch occurs, push init segment before loading or reloading media segment.
Works perfect! |
Hi,
as explained in the issue #1928, the audio track switch is broken for segmentTimeLine dash manifest. I think that it's unnecessary to destroy audio stream processor when an audio switch occurs. What dash.js player has to do is to restart scheduleController, load the new init segment and continue .... :-)
In order to this PR has to work properly, PR #2144 needs to be merged. I also would like to do more tests with dash streams with many audio tracks, if you have some.....thanks! ;-)
Nicolas