Skip to content

Changes to presentationTimeOffset value not tracked, 404s from Mediatailor #8351

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

Open
pgrog opened this issue Mar 28, 2025 · 0 comments
Open
Labels
component: DASH The issue involves the MPEG DASH manifest format type: bug Something isn't working correctly
Milestone

Comments

@pgrog
Copy link

pgrog commented Mar 28, 2025

Have you read the FAQ and checked for duplicate open issues?
Yes

If the problem is related to FairPlay, have you read the tutorial?

N/A

What version of Shaka Player are you using?

4.14.0

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Can reproduce in demo app

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Chrome, mac

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A

What are the manifest and license server URIs?

I can't share the full live stream, but I've sliced a section of it below that demonstrates the problem

https://shaka-player-demo.appspot.com/demo/#audiolang=en-GB;textlang=en-GB;uilang=en-GB;assetBase64=eyJuYW1lIjoiZXhhbXBsZSIsInNob3J0TmFtZSI6IiIsImljb25VcmkiOiIiLCJtYW5pZmVzdFVyaSI6Imh0dHBzOi8vbWc4OTljNjloNi5leGVjdXRlLWFwaS5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbS9wcm9kL2ZpbGVzL21hbmlmZXN0P3JlZnJlc2g9dHJ1ZSIsInNvdXJjZSI6IkN1c3RvbSIsImZvY3VzIjpmYWxzZSwiZGlzYWJsZWQiOmZhbHNlLCJleHRyYVRleHQiOltdLCJleHRyYVRodW1ibmFpbCI6W10sImV4dHJhQ2hhcHRlciI6W10sImNlcnRpZmljYXRlVXJpIjpudWxsLCJkZXNjcmlwdGlvbiI6bnVsbCwiaXNGZWF0dXJlZCI6ZmFsc2UsImRybSI6WyJObyBEUk0gcHJvdGVjdGlvbiJdLCJmZWF0dXJlcyI6WyJWT0QiXSwibGljZW5zZVNlcnZlcnMiOnsiX190eXBlX18iOiJtYXAifSwib2ZmbGluZUxpY2Vuc2VTZXJ2ZXJzIjp7Il9fdHlwZV9fIjoibWFwIn0sImxpY2Vuc2VSZXF1ZXN0SGVhZGVycyI6eyJfX3R5cGVfXyI6Im1hcCJ9LCJyZXF1ZXN0RmlsdGVyIjpudWxsLCJyZXNwb25zZUZpbHRlciI6bnVsbCwiY2xlYXJLZXlzIjp7Il9fdHlwZV9fIjoibWFwIn0sImV4dHJhQ29uZmlnIjpudWxsLCJleHRyYVVpQ29uZmlnIjpudWxsLCJhZFRhZ1VyaSI6bnVsbCwiaW1hVmlkZW9JZCI6bnVsbCwiaW1hQXNzZXRLZXkiOm51bGwsImltYUNvbnRlbnRTcmNJZCI6bnVsbCwiaW1hTWFuaWZlc3RUeXBlIjpudWxsLCJtZWRpYVRhaWxvclVybCI6bnVsbCwibWVkaWFUYWlsb3JBZHNQYXJhbXMiOm51bGwsInVzZUlNQSI6dHJ1ZSwibWltZVR5cGUiOm51bGx9;panel=CUSTOM%20CONTENT;build=uncompiled

What configuration are you using? What is the output of player.getNonDefaultConfiguration()?

Can generate issue with default configuration

What did you do?

Stream through a commercial break from a mediatailor endpoint. As the DAI break ends and content resumes, shaka player starts requesting fragments that do not exist and encounters 404 responses from the origin.

What did you expect to happen?
Shaka requests the correct segments, playback continues

What actually happened?

We are using mediatailor as our DAI solution. Our streams work fine in shaka version 3.3 and in the dashjs reference player. From version 4.4.0 onwards, shaka starts miscalculating fragment uris when coming to the end of a DAI break

It looks like the miscalculation stems from how shaka handles (or does not handle) a change in the value of the presentation time offset of a period. There are two manifests in my reproduction stream above. The presentationTimeOffset and SegmentTimeline change slightly.

period from manifest 1

<Period id="1743024852.720" start="PT484173H34M12.72S">
    <BaseURL>dash/</BaseURL>
    <AdaptationSet audioSamplingRate="48000" codecs="mp4a.40.2" contentType="audio" group="1" id="1" lang="ga" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
        <Representation bandwidth="96000" id="alternative_language=96000">
            <SegmentTemplate initialization="vc11-ssai-test-$RepresentationID$.dash" media="vc11-ssai-test-$RepresentationID$-$Time$.dash" presentationTimeOffset="83665192931199" startNumber="2" timescale="48000">
                <!-- 2025-03-26T21:34:10.600000Z / 1743024850 - 2025-03-26T21:34:37.480000Z -->
                <SegmentTimeline>
                    <S d="81921" t="83665192931199"/>
                    <S d="184320" r="5" t="83665193013120"/>
                </SegmentTimeline>
            </SegmentTemplate>
        </Representation>
    </AdaptationSet>

period from manifest 2

<Period id="1743024852.720" start="PT484173H34M12.72S">
    <BaseURL>dash/</BaseURL>
    <AdaptationSet audioSamplingRate="48000" codecs="mp4a.40.2" contentType="audio" group="1" id="1" lang="ga" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
        <Representation bandwidth="96000" id="alternative_language=96000">
            <SegmentTemplate initialization="vc11-ssai-test-$RepresentationID$.dash" media="vc11-ssai-test-$RepresentationID$-$Time$.dash" presentationTimeOffset="83665192930560" startNumber="1" timescale="48000">
                <!-- 2025-03-26T21:34:14.440000Z / 1743024854 - 2025-03-26T21:34:41.320000Z -->
                <SegmentTimeline>
                    <S d="184320" r="6" t="83665193013120"/>
                </SegmentTimeline>
            </SegmentTemplate>
        </Representation>
    </AdaptationSet>

Shaka ignores this change, and as a result the uris calculated are inaccurate and we get 404s from the origin.

As a workaround, we added a check to the parseRepresenation method to recreate the timeline if there's a difference between the incoming presentationTimeoffset and the stored unscaledPresentationTimeOffset. It works, but I couldn't say for sure what other problems that may introduce!

@pgrog pgrog added the type: bug Something isn't working correctly label Mar 28, 2025
@shaka-bot shaka-bot added this to the v4.15 milestone Mar 28, 2025
@avelad avelad added the component: DASH The issue involves the MPEG DASH manifest format label Mar 31, 2025
@avelad avelad modified the milestones: v4.15, v4.16 Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DASH The issue involves the MPEG DASH manifest format type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants