Playback failed - Multiperiod with Manifest manipulation

:backhand_index_pointing_right: Bug Description


1. Summary

Provide a brief description of the bug in the SDK and its impact on app functionality.

App Name: RaiPlay
App Link on Amazon Appstore (found through Developer Console → Actions column in App List → View on Amazon.com): RaiPlay - App on Amazon Appstore

Bug Severity
Select one that applies

  • Impacts operation of app
  • Blocks current development
  • Improvement suggestion
  • Issue with documentation (If selected, please share the doc link and describe the issue)
  • Other

2. Steps to Reproduce

  1. Launch application
  2. Log-in with credentials
  3. Try to reproduce some content

3. Observed Behavior

If we try to play 'Calcio: Europei Femminili Inghilterra - Spagna: i Rigori'  we don't encounter any problems, but when we try to play 'Calcio: Europei Femminili Semifinale: Inghilterra - Italia' the video doesn't start with the error you find in the attachment.

4. Expected Behavior

Describe what you expected the SDK to do under normal operation.

Both videos start the same way

4.a Possible Root Cause & Temporary Workaround

Fill out anything you have tried. If you don’t know, N/A is acceptable

The issue is in the multiperiod with manifest manipulation on dash, when switching between different versions of the same codec playback fails

5. Logs or crash report

Log playback failed

6. Environment

Please fill out the fields related to your bug below:

  • SDK Version: 0.21.4677

  • App State: Foreground

  • OS Information: Please ssh into the device via vega exec vda shell (or kepler exec vda shell for v0.21 and earlier) and copy the output from cat /etc/os-release into the answer section below. Note, if you don’t have a simulator running or device attached, the command will respond with vda: no devices/emulators found

    NAME="OS"
    OE_VERSION="4.0.0"
    OS_MAJOR_VERSION="1"
    OS_MINOR_VERSION="1"
    RELEASE_ID="10"
    OS_VERSION="1.1"
    BRANCH_CODE="TV Ship"
    BUILD_DESC="OS 1.1 (TV Ship/10240300)"
    BUILD_FINGERPRINT="1.0.24030.0(9a1d8dfa7da5d600)/10240300N:user/dev-keys"
    BUILD_VARIANT="user"
    BUILD_TAGS="dev-keys"
    BUILD_DATE="Thu Sep 25 10:32:58 UTC 2025"
    BUILD_TIMESTAMP="1758796378"
    VERSION_NUMBER="1002034030030" 
    

I attached the simulator one, but we also tested it on a physical device in production


:backhand_index_pointing_right: Playback Issues


If this is a playback issue, please provide your content URL, any pre-conditions (like geo-location), and let us know if it’s x86 or arm7.


'The issue is in the multiperiod with manifest manipulation on dash, when switching between different versions of the same codec playback fails'

Please share the following details in addition:_

  • Player SDK: Shaka
  • Player SDK Version: 4.8.5-r1.2
    • Audio Codecs: view attachments
    • Video Codecs: view attachments
    • Manifest Types: dash

Q: If applicable, please provide your media/content url
If this is created dynamically, tokenized, etc please provide a way for us to access it

The URLs of the contents cited will be sent to you privately.

Q: Are there any special headers required to reproduce the issue you are facing?

N/A

Additionally please provide the following if possible
Provide Screenshots / Screengrabs / Logs. Please include as much information as you can that will help debug.

Manifest with the codecs we’re having issues with.

Working Manifest

Not Working Manifest

Hello @Dev_Rai

Thank you for the detailed bug report!
This looks like a codec switching issue in multiperiod DASH manifests. Based on your screenshots, the failing manifest has different codec configurations between periods.

The issue is caused by H.264 level mismatch between periods. Period 0 uses Level 4.0 (avc1.4d4028) while Period 1 uses Level 3.1 and 4.1 (avc1.4d401f, avc1.4d4029).
The MediaSource API cannot seamlessly switch between different codec levels during period transitions, which is why “Calcio: Europei Femminili Semifinale: Inghilterra - Italia” fails while the other content works.

Solution: Normalize all periods to use the same codec level (4.0). This means re-encoding Period 1 content to use avc1.4d4028 to match Period 0.

Temporary workaround (if re-encoding isn’t immediately possible): You can try forcing Shaka Player to reload the MediaSource on period transitions, though this may cause a brief playback interruption.

Please let us know if this resolves the issue or if you need further assistance!

Warm regards,
Ivy