google / google/ExoPlayer

Improve time stretching for music

Open
#6,575 11 comments 0 reactions 1 assignee Assigned to @tonihei View on GitHub
enhancement low priority
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### [REQUIRED] Issue description
I recently downloaded the demo application, and I am experimenting with time stretching the playback of a local MP3 song on my Samsung Galaxy S10, by setting the PlaybackParams of the SimpleExoPlayer instance.

Even changing the speed by a relatively small amount (e.g. 1.25f) without changing the pitch makes the playback of the song sound awful (a bit hard to explain, but "wobbly" is the word that comes to mind). (Simple speech does not seem to be affected the same way).

Playing the song at speed 1.0f works as expected.

### [REQUIRED] Reproduction steps
In the demo app I modified the "Misc -> Google Play (MP3 Audio)" section to use my local MP3 file, which had been added to the project assets.

In PlayerActivity I then added:

player.setPlaybackParameters(new PlaybackParameters(speed: 1.25f));

just before

player.setPlayWhenReady(startAutoPlay);

### [REQUIRED] Link to test content
One of my test MP3 songs has been sent by email, but any MP3 song I have tried has exhibited the same behaviour (most prevalent with both vocals and instruments).

### [REQUIRED] A full bug report captured from the device
This does not involve a crash, so there is no bug report.

### [REQUIRED] Version of ExoPlayer being used
2.10.6

### [REQUIRED] Device(s) and version(s) of Android being used
Samsung Galaxy S10
Android 9.0
I am able to reproduce the issue with any MP3 song I have tried.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.