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

DASH playback start position is wrong under SegmentTemplate number mode #8537

Closed
happyong-ib opened this issue Feb 3, 2021 · 4 comments
Closed
Assignees
Labels

Comments

@happyong-ib
Copy link

happyong-ib commented Feb 3, 2021

Under Dash number mode, the playback starts from the begin of window, seems the suggestedPresentationDelay of manifest does not apply.
I use the dev-v2 branch 724ded1 (2021-01-26).

I also debug the code, please check the following code in DashMediaSource.java line 917,
long liveStreamEndPositionInLastPeriodUs = currentEndTimeUs - C.msToUs(lastPeriod.startMs);
Here the currentEndTimeUs refers to the period-relative endTimeUs, it shouldn't subtract the period.startMs.

@ojw28
Copy link
Contributor

ojw28 commented Feb 3, 2021

In nearly all cases where we've received reports similar to this one, the problem was that the media being played did not conform to the DASH specification.

In any case, we need concrete reproduction steps to investigate this further. Please provide an accessible sample stream and reproduction steps for us to take a look.

@happyong-ib
Copy link
Author

happyong-ib commented Feb 4, 2021

Our test live stream is difficult to push to the public network, I can only provide one MPD for reference. Here it is single period with non-zero value for start@Period.
t594_hd_long.zip

I also find one public dashif test streaming for testing,
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Stream > LIVE (Dynamic MPD) > Multiperiod SegmentTemplate. New period every minute (livesim), click 'Load' to play. It works well in dash javascript player. It display the current time with format "00:mm:ss:SS".
I aslo test it on exoplayer but playback failed, I got http 404 and also found the requested media url use startNumber of first period in mpd. I have some doubts about liveStreamEndPositionInLastPeriodUs value, also included these params naming and values of function updateMediaItemLiveConfiguration() (cause the liveConfiguration.targetOffsetMs with abnormal vaule), please double check them. Test steps:

  1. check out the dev-v2 branch 724ded1 (2021-01-26)
  2. add the following lines into demo/assets/media.exolist.json
    {
    "name": "DASH number with multi-period",
    "uri": "https://livesim.dashif.org/livesim/periods_60/continuous_1/testpic_2s/Manifest.mpd"
    }
  3. lanuch demo app and click this test streaming, report "playback failed", from the logcat report http 404.
    logcat.txt

@ojw28
Copy link
Contributor

ojw28 commented Feb 10, 2021

@tonihei - The stream provided above works in 2.12, but not in 2.13. I think this must be related to changes made for low latency live streaming. I did a bit of digging and shared a possible fix for discussion.

@tonihei
Copy link
Collaborator

tonihei commented Feb 11, 2021

Thanks both! @happyong-ib Your initial investigation exactly pinpointed the problem, sorry for the delay in addressing this. We'll push a fix soon and release it as part of 2.13.1.

ojw28 pushed a commit that referenced this issue Feb 12, 2021
The available end time was accidentally substracted by the start time
of the last period.

To avoid similar time reference confusion in the future, also renaming
many variables and methods to clearly reflect the time reference point.
And to avoid constant conversion, the processManifest method also
attempts to converge to time relative to the start of the window as
quickly as possible.

Issue: #8537
PiperOrigin-RevId: 357001624
@ojw28 ojw28 closed this as completed Feb 12, 2021
ojw28 pushed a commit that referenced this issue Feb 12, 2021
The available end time was accidentally substracted by the start time
of the last period.

To avoid similar time reference confusion in the future, also renaming
many variables and methods to clearly reflect the time reference point.
And to avoid constant conversion, the processManifest method also
attempts to converge to time relative to the start of the window as
quickly as possible.

Issue: #8537
PiperOrigin-RevId: 357001624
@google google locked and limited conversation to collaborators Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants