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.73k stars 414 forks source link

Running renderers of different threads during playback #1791

Open Romantic-LiXuefeng opened 1 month ago

Romantic-LiXuefeng commented 1 month ago

[REQUIRED] Use case description

https://github.com/google/ExoPlayer/issues/5796#issuecomment-517748828 ExoPlayer currently do audio and video render one after the other. Running renderers of different threads during playback, to improve rendering performance.

We have enabled experimental asynchronous MediaCodec queueing when playing an 8K(HEVC + AAC) content. It's still found the video frames dropping. We invested that MediaCodec decode video and audio quickly in asynchronous mode, but the decoded audio frame consumed slowly during playback(because of the ExoPlayerInternalThread not switched with sufficient frequency), it causes the video frame drops for A/V sync.

Proposed solution

Running renderers in parallel during playback , rather than one after the other.

Alternatives considered

N/A

Romantic-LiXuefeng commented 2 weeks ago

Any updates on this issue?