Version
Media3 1.9.2
More version details
First observed in version 1.9.1
Devices that reproduce the issue
Devices running API Level 29 (Android 9) or below
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
- Play a video with multiple video tracks that have different frame rates (e.g. 1080p25 & 1080p50)
- Wait for the stream to switch to the highest quality stream (switch from 25 fps to 50 fps)
Expected result
Stream switch happens without black frames
Actual result
While stream is switched, a black frame is displayed
Media
It appears the change introduced in #2941 (Diff) is the root cause of this issue. While I don't fully follow the reasoning behind these changes, they have significantly degraded the playback experience. If a stream switches frame rates frequently, the resulting constant flickering is quite disruptive for the user.
As a temporary measure, we have set VideoChangeFrameRateStrategy to VIDEO_CHANGE_FRAME_RATE_STRATEGY_OFF for API levels below 30. This successfully prevents the black frames from occurring.
https://github.com/user-attachments/assets/233e6ae1-721e-4b4e-a2a8-f1446eda2101
logcat_black_frame.txt
Bug Report
Version
Media3 1.9.2
More version details
First observed in version 1.9.1
Devices that reproduce the issue
Devices running API Level 29 (Android 9) or below
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Expected result
Stream switch happens without black frames
Actual result
While stream is switched, a black frame is displayed
Media
It appears the change introduced in #2941 (Diff) is the root cause of this issue. While I don't fully follow the reasoning behind these changes, they have significantly degraded the playback experience. If a stream switches frame rates frequently, the resulting constant flickering is quite disruptive for the user.
As a temporary measure, we have set
VideoChangeFrameRateStrategytoVIDEO_CHANGE_FRAME_RATE_STRATEGY_OFFfor API levels below 30. This successfully prevents the black frames from occurring.https://github.com/user-attachments/assets/233e6ae1-721e-4b4e-a2a8-f1446eda2101
logcat_black_frame.txt
Bug Report
adb bugreportto android-media-github@google.com after filing this issue.