-
Notifications
You must be signed in to change notification settings - Fork 6k
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
IMA post-roll ad marker lost when video duration is less than audio duration #6552
Comments
I'm confused with |
It's hard to be sure without seeing the DASH manifest, but it sounds as though this is not inter-operable DASH content according to the new DASH-IF interoperability definition. In particular:
In the case you describe it sounds like the video representation falls into the "end not covered" case as shown in Figure 6 of that document. Depending on how your DASH manifest is structured, it might be possible for you just to "fix" the video duration to be the same as the audio duration in the manifest. |
On the UI side, I'm not sure why we don't display ad markers at all in the case where they're not within the window duration. @andrewlewis - Is there a reason for doing this, as opposed to still displaying the marker at the very end of the timeline? |
Assigning to @andrewlewis for the UI question. |
Issue: #6552 PiperOrigin-RevId: 287964221
Issue: #6552 PiperOrigin-RevId: 287964221
Issue description
We have some assets(dash stream) which's video duration is less than audio duration, and mediaPresentationDuration equals audio duration, for example, the audio duration is 5793364041us, video duration is 5793162375us, mediaPresentationDuration is 5793364ms.
In this case, the post-roll ad marker won't show.
Reproduction steps
The asset content is protected by drm. I will show which codes caused the issue.
in dash MPD, mediaPresentationDuration="PT1H36M33.364041S", it's 5793364ms.
in PlayerControlView#updateTimeline
when
adGroupTimeInPeriodUs == C.TIME_END_OF_SOURCE)
,adGroupTimeInPeriodUs = period.durationUs
;adGroupTimeInWindowUs = adGroupTimeInPeriodUs + period.getPositionInWindowUs();
in DashMediaSource#getWindow,
windowDurationUs is calcuated from
lastPeriodSeekInfo.availableEndTimeUs - firstPeriodSeekInfo.availableStartTimeUs
.PeriodSeekInfo.availableEndTimeUs probably equals
Math.min(audioDuration, videoDuration)
.period duration equals dash mediaPresentationDuration
back to
PlayerControlView
, for postroll:adGroupTimeInWindowUs
=period.durationUs+period.getPositionInWindowUs()=dash mediaPresentationDuration=5793364000us,window.durationUs
=lastPeriodSeekInfo.availableEndTimeUs-firstPeriodSeekInfo.availableStartTimeUs = Math.min(audioDuration, videoDuration)=5793162375usadGroupTimeInWindowUs > window.durationUs, the postroll won't show.
Version of ExoPlayer being used
v2.10.5
Device(s) and version(s) of Android being used
emulator Nexus 5x API 28
The text was updated successfully, but these errors were encountered: