ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Exoplayer failing when playing an 8 channel audio file in Android 8.0

Open roundsmapp opened this issue 8 years ago • 36 comments

Issue description

Exoplayer is failing when playing audio files, mp3 or ogg, with 8 channels, in Android 8.0, in some specific Samsung phones.

By "failing" I mean it plays the audio as if it was in very slow motion, not in a smooth way, in those specific devices.

It plays well in other devices tested so far, Samsung and other brands. It even plays well in a Samsung S7 with Android 8.0.

Reproduction steps

  1. modify file media.exolist.json to play one single ogg file
  2. place this ogg file in the assets directory
  3. modify method initializePlayer() within class PlayerActivity, replacing following code line: player.prepare(mediaSource, !haveResumePosition, false); by code lines below, in order to play in loop mode: LoopingMediaSource loopingSource = new LoopingMediaSource(mediaSource, 100); player.prepare(loopingSource, !haveResumePosition, false);
  4. Play the demo

Link to test content

Audio sample file sent by e-mail to [email protected].

Version of ExoPlayer being used

2.8.1

Device(s) and version(s) of Android being used

Samsung S9 SM-G9600 and A5 SM-A520F, both running Android 8.0.0. I have noticed also that both of them have the Octa-core chip. It may be a coincidence or not.

A full bug report captured from the device

There is no abnormal message shown in logcat when testing.

roundsmapp avatar Oct 09 '18 13:10 roundsmapp

Hello, @andrewlewis , any news about this issue?

roundsmapp avatar Nov 01 '18 13:11 roundsmapp

The most similar device I could get hold of was a Samsung Galaxy S9 samsung/starltexx/starlte:8.0.0/R16NW/G960FXXU2BRGA:user/release-keys and I couldn't reproduce the issue on there, but it appears to have a different chipset unfortunately. Can you reproduce the issue on any other devices?

Do you have the same issue when playing the media via MediaPlayer with adb shell am start -a android.intent.action.VIEW -d "file:///sdcard/some_file_name.ogg" -t "audio/*"? What about if you play it from a file:// URI rather than as an asset, and without looping?

andrewlewis avatar Nov 05 '18 11:11 andrewlewis

Closing due to inactivity.

andrewlewis avatar Dec 19 '18 14:12 andrewlewis

Hello, Andrew,

Can we reopen this Issue? I have more data from the guys that are testing the App.

Thank you


De: Andrew Lewis [email protected] Enviado: quarta-feira, 19 de dezembro de 2018 11:03 Para: google/ExoPlayer Cc: roundsmapp; Author Assunto: Re: [google/ExoPlayer] Exoplayer failing when playing an 8 channel audio file in Android 8.0 (#4924)

Closed #4924https://github.com/google/ExoPlayer/issues/4924.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/google/ExoPlayer/issues/4924#event-2035749674, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aj6r8rFaX5k45PeeuDieNUG-gy4Lssehks5u6kc3gaJpZM4XTSeD.

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

roundsmapp avatar Feb 07 '19 13:02 roundsmapp

Even using file:// instead of assets, the audio still fails. It works without looping, but it doesn't solve it, as looping is mandatory.

roundsmapp avatar Feb 13 '19 00:02 roundsmapp

@roundsmapp Are you saying that if you use looping the audio doesn't play smoothly, but it does play smoothly without? This sounds very strange. A recording of the problematic behavior might help us figure out what's going on.

Please could you also address the other questions from my comment of Nov 5?

andrewlewis avatar Feb 14 '19 19:02 andrewlewis

Summarizing the tests:

  • Media Player launched from adb:

    • very small audio ogg file, aprox 9 sec length, without looping, worked well
    • much bigger file, aprox 2 min 30 sec, without looping, worked well
  • ExoPlayer demo, using both "file://" and "assets" as repository:

    • small audio file, without looping, worked well
    • bigger file, without looping, failed
    • both files, with looping, failed

Failures are random. Don't have an specific time to occur. It can be at the beginning, after 1 min, at the end, etc.

I've tried to figure out how to launch Media Player from adb using continuous (looping) mode but I did't find a way. Can this be done?

roundsmapp avatar Feb 19 '19 00:02 roundsmapp

Video with recording of the problem just sent to [email protected].

roundsmapp avatar Feb 19 '19 00:02 roundsmapp

@andrewlewis Any news on this?

roundsmapp avatar Mar 22 '19 12:03 roundsmapp

It sounds a bit like the audio track is underrunning but you should see warnings output to logcat if that's happening.

Let's focus on the issue with playing the longer OGG file without looping, to keep things simple for now. Please could you send a bug report taken while reproducing the issue playing that stream with the unmodified ExoPlayer demo app? It may also be useful to have another bug report taken while playing that stream with MediaPlayer (where it plays correctly). Thanks.

andrewlewis avatar Mar 22 '19 13:03 andrewlewis

@andrewlewis I've sent the bug report to [email protected], under title Issue #4924

roundsmapp avatar Apr 12 '19 00:04 roundsmapp

Hey @roundsmapp. We need more information to resolve this issue but there hasn't been an update in 14 days. 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!

google-oss-bot avatar Jun 24 '19 16:06 google-oss-bot

Please ignore the comment from @google-oss-bot .

ojw28 avatar Jun 24 '19 16:06 ojw28

@roundsmapp Sorry for the delay. The bug report provided is from ExoPlayer 2.7.1 and does show some AudioTrack underruns. There was at least one fix around tracking the audio position while looping since that build, so please could you update to tip-of-tree and try to reproduce this in the ExoPlayer demo app? As some time has passed it would also be worth checking for system updates for the affected device, in case there was also a decoder fix (to address the non-looping issue).

andrewlewis avatar Sep 02 '19 13:09 andrewlewis

@andrewlewis I'll do this upgrade and test it.

roundsmapp avatar Sep 14 '19 20:09 roundsmapp

I'm still working on this. The latest ExoPlayer version is 2.10.5. Is that correct?

roundsmapp avatar Oct 24 '19 19:10 roundsmapp

As of today 2.10.6 has been released. You can check by looking at the release notes.

andrewlewis avatar Oct 30 '19 14:10 andrewlewis

Hey @roundsmapp. We need more information to resolve this issue but there hasn't been an update in 14 days. 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!

google-oss-bot avatar Nov 14 '19 02:11 google-oss-bot

I'm making another test. It took me a while to find a smartphone of the model that was having the issue (Samsung Galaxy S9). I just found a friend who has it. I'm waiting for him to conclude the tests (he lives far from me).

Therefore, I ask you to please give me some extra time to send the results.

roundsmapp avatar Nov 19 '19 13:11 roundsmapp

Hey @roundsmapp. We need more information to resolve this issue but there hasn't been an update in 14 days. 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!

google-oss-bot avatar Dec 21 '19 02:12 google-oss-bot