google / google/ExoPlayer

Allow setting playback parameters for a future position (including media item transitions)

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

Description

Hi,

I'm using ConcatenatingMediaSource to play a sequence of videos, some of which need to be played at a different speed / pitch, while keeping a smooth playback.

The doc for Player#setPlaybackParams() states that "Playback parameters changes may cause the player to buffer.", so an approach that "monitors playback progress" and applies any updated params when necessary would not work well here.

I also noticed digging through setPlaybackParams() that any pending samples are *not* flushed out of the AudioTrack, so when calling this method during playback, you can still hear samples transformed with previous settings for a few milliseconds.

Is there any mechanism that I could use to let the player know up front that when buffering from timestamp t1, it should start doing so using a different set of playback params?

I'm currently on ExoPlayer 2.8.

Would appreciate any tips on this. Thanks!

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.