Skip to content

Live Sync fails over several hours - SNTP time update #696

@stevemayhew

Description

@stevemayhew

Version

Media3 1.1.1

More version details

Run two Android TV streamers side by side with a set latency target (either via <ServiceDescription> or using MediaItem.Builder(). setLiveConfiguration(...)). Observe they will lock in to nearly the frame from the start.

After several hours of runtime they will drift, potentially 100's of milliseconds apart. The cause is the inaccuracy of System.elaspedTime() over

Devices that reproduce the issue

  • Google TV w/Chromecast
  • Evolution e*Stream 4k
  • Likely many others with SEI / AmLogic SoC

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play media (on request) for several hours (longer give more error)
  2. Observe sync gradually declines

Expected result

With the proposed fix in the pull request the streams have played over 10 hours with no errors.

Actual result

streams are out of sync in 5 or so hours. Note this may seem like a long time, but imagine a bar or health club setting. Also, there is no recovery by changing the channel (requires force-stop of the application hosting ExoPlayer)

Media

on request, not you may really need at least 5 hours of playback to see the issue.

Bug Report

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions