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

Always seek to the start position to mitigate impact of timestamp misalignments #135

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

defagos
Copy link
Member

@defagos defagos commented Jul 24, 2024

Description

This PR mitigates the impact of timestamp misalignments in on-demand streams.

Hints

We discovered an issue with our new stream packaging solution based on AWS MediaPackage.

On-demand content currently delivered contains timestamps, which are not strictly excluded per RFC AFAWK but that MUST be aligned between media playlists if present. In our case the various media playlists have misaligned timestamps (sometimes off by more than a minute!) and we figured out that this makes the player start at different default positions (not necessarily zero) depending on the variant initially selected (sometimes more than a minute!). From a user perspective this means that depending on the player frame size (e.g. on iPad where Split View can be used) a faulty video can start at different locations, which is annoying.

A proper fix must be made on the packaging side, likely by AWS (a dedicated issue has been reported). Timestamps should either be aligned (AWS fix) or dropped (our choice). In our case they can be dropped since the content we usually publish has no use of timestamps (we are here namely talking about TV series or movies, as timestamps could make sense for on-demand content obtained as a result of a DVR playlist being ended). Either fix will take time, though, and affected videos (more than 3000 at RTS, less for other BUs) will not be processed again since they need to go through the whole upload / encoding / packaging workflow again, even though the issue is in the packaging itself.

We discovered, though, that our Pillarbox player is more resilient to this issue and could identify why. Pillarbox namely always sets a start position, even when it is the default one (zero). This has no noticeable negative effect on startup times (confirmed by having a look at Pillarbox startup metrics with / without the associated code) but ensures a more reliable behavior. This PR applies the same approach to SRG Media Player to make it resilient in the same way.

Changes made

  • Always set a startup position, even when starting at the default position.

@defagos defagos self-assigned this Jul 24, 2024
@defagos defagos requested a review from waliid July 24, 2024 17:01
@defagos defagos requested a review from pyby July 24, 2024 17:01
@defagos defagos merged commit fab4f77 into develop Jul 25, 2024
1 check passed
@defagos defagos deleted the feature/timestamp-misalignment-mitigation branch July 25, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants