ithlony / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

DASH: SegmentTemplate startNumber is ignored: wrong segments loaded #588

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Play a DASH Manifest (MPD) for content that starts somewhere other than 
PTS=0 in the content. ie. the presentationTimeOffset is non-zero, and the 
startNumber attribute indicates the segment that contains that time in the 
media.

However when that MPD is played on the Chromecast, the client requests segments 
far beyond the specified startNumber, often beyond the end of the content.

For example the following SegmentTemplates:

Audio:
<SegmentTemplate timescale="1000" presentationTimeOffset="898728" 
duration="2048" startNumber="438" 
initialization="audio/$RepresentationID$/init.mp4" 
media="audio/$RepresentationID$/$Number$.m4s"/>

Video:
<SegmentTemplate timescale="1000" presentationTimeOffset="898728" 
duration="2048" startNumber="438" 
initialization="video/$RepresentationID$/init.mp4" 
media="video/$RepresentationID$/$Number$.m4s"/>

Both audio & video use the same timescale, startNumber & 
presentationTimeOffset. The only difference is the content types & media URLs.

Loading this MPD results in requests for the two init segments, followed by 
audio segment 876 and video segment 1313.

Both SegmentTemplates have the startNumber set, so the first request should be 
for 438.m4s for both audio & video. Playback should then start as soon as the 
PTS values for 898729 milliseconds are found in the media content (in this case 
it would be PTS=80885520 for a 90kHz PTS clock in the video stream).

What is the expected output? What do you see instead?

I expect to see a request for 438.m4s for both the selected audio & video 
profiles.

Instead I see an initial request for video segment 1313.m4s, followed by 
repeated requests for segment 876 of both audio & video, including the same 
Representation repeatedly, and the content does not play, because that content 
does not exist (HTTP 404 from the server).

What version of the product are you using? On what operating system?

Chromecast firmware version 31432.

Please provide any additional information below.

This is similar to issue #444, but this one applies to static content rather 
than dynamic. The calculated startNumber is not negative like it is in issue 
#444, instead it is about double what it should be, perhaps because it is 
determining the segment number based on the timescale rather than the explicit 
startNumber (or even the segment duration).

Either way, the startNumber should not be overridden by the 
presentationTimeOffset. The player should not assume that segment 0 (or 1) 
contains presentationTimeOffset=0.

For reference, dash.js plays this content because it loads content from the 
startNumber before beginning its forward search for the desired 
presentationTimeOffset.

Original issue reported on code.google.com by ted.perc...@gmail.com on 1 Jun 2015 at 11:30

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 2 Jun 2015 at 10:42