androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.66k stars 392 forks source link

DTSX Audio out of sync #1182

Open ProtoScott opened 7 months ago

ProtoScott commented 7 months ago

Version

Media3 main branch

More version details

Tested on 1.3.0 (release)

Devices that reproduce the issue

Sony Bravia A95L 65"

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play the media back with DTSX audio

Expected result

Audio in sync with video

Actual result

Audio is out of sync with video by several seconds

Media

Emailed.

Bug Report

tonihei commented 7 months ago

Thanks for reporting. Could you tell us more about your setup? For example, it would be interesting to know whether you've enabled tunneling on this device because the AV sync is handled in very different places if tunneling is enabled.

ProtoTom commented 7 months ago

Hi @tonihei we tested with a very basic setup using media 1.3.0. We did not enable tunnel mode. Here is our setup where you can change the dashUrl variable to the media Scott has emailed.

val dashUrl ="dash manifest url here"

val trackSelectorParamsBuilder = DefaultTrackSelector.ParametersBuilder(context)
val trackSelectorParams = trackSelectorParamsBuilder.build()

val trackSelector = DefaultTrackSelector(context)
trackSelector.parameters = trackSelectorParams

val defaultRenderersFactory = DefaultRenderersFactory(context)
defaultRenderersFactory.setEnableDecoderFallback(true)

exoPlayer = ExoPlayer.Builder(context,defaultRenderersFactory)
    .setTrackSelector(trackSelector).build().apply
    {
        setHandleAudioBecomingNoisy(true)
    }

val mediaItem = MediaItem
    .fromUri(dashUrl)
    .buildUpon()
    .build()

val dashMediaSource = DashMediaSource.Factory(datasourceFactory).createMediaSource(mediaItem)

val videoPlayerView = findViewById<PlayerView>(R.id.video_player_view)
videoPlayerView.player = exoPlayer
exoPlayer.setMediaSource(dashMediaSource)
exoPlayer.prepare()
exoPlayer.playWhenReady = true
tonihei commented 6 months ago

I unfortunately don't have a device at hand that can decode DTSX to test fully, but just looking at the MP4 files in your DASH manifest, everything looks as expected. Does this file play in sync in any other player? And can you describe the "multiple seconds out of sync" in more detail for us to understand the potential problem area? For example, does audio start late, does video start late, does it only happen after seeking or right from start, how many seconds out of sync exactly, etc.

google-oss-bot commented 6 months ago

Hey @ProtoScott. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

ProtoTom commented 6 months ago

It seems that the audio is always a couple of seconds behind the video. Its hard to determine the exact amount of time it is out of sync as we are relying on visual clues in the video to when sound should definitely occur. We have been able to reproduce the issue every time with the sample media provided

google-oss-bot commented 5 months ago

Hey @ProtoScott. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!