Fast play will cause the HD video frozen
Issue description
When testing the new feature of set playback speed, it works well with small video clips, lets say, 240p or 480p, with speed from 1/8 to 8x. However, when trying this feature with HD video, e.g. video clip captured by camera app, when speed is <1.0f it worked fine but if setting speed >= 2.0f, video will freeze after playing several frames (1-2s). And this cannot be recovered no matter how long I waited.
Reproduction steps
Just use the new simple Exoplayer to play a HD video clip captured by camera app, set the speed > 2.0f.
Link to test content
Use camera app to record some HD video clip
Version of ExoPlayer being used
r2.4.0
Device(s) and version(s) of Android being used
Google Pixel Phone, Android Nougat 7.1
if possible, when the power of the device cannot support fast playing of HD video, can Exoplayer try to seek for the iFrame only?
Yes, this is on our list of follow-up work for variable speed playback.
Before the enhancement is ready, how can I detect this frozen and take action?
Same issue. Tested on Nexus 5 with API 23, Samsung Galaxy Tab A (2016) SM-T280 API 21. But on Samsung SM-T580 API 23 HD video with 2x is working.
I think this is fixed in 2.6.0. @andrewlewis - Can this be closed? Thanks!
I can still reproduce this bug on latest dev-v2 branch:
In PlayerActivity::initializePlayer(), add
player.setPlaybackParameters(new PlaybackParameters(2.0f, 1.0f));
Then build and install the demo app on a Google Pixel Phone with Android 7.1, run the demo app, and play a 1080p video, for example, Misc -> Screens 1080p (FMP4, H264, No Audio)
Can you see if the above steps reproduce the bug for you? Thanks.
Yes, I think this can be closed: video renderers now skip to keyframes if their decoders can't keep up.
@jinminghe That sample plays as expected at high playback speeds for me: video is not smooth but keyframes are now shown (the old behavior was that one video frame was shown then video was frozen for the duration of playback). In the demo app you should see that a frame is rendered occasionally and the "dropped to keyframe" counter labeled dk: gets incremented each time a frame is shown when the decoder can't keep up.
@andrewlewis Thanks. Thought the frame drops were same as 'frozen'.
I can still reproduce this bug on version 2.7.2:
In PlayerActivity::initializePlayer(), add player.setPlaybackParameters(new PlaybackParameters(2.0f, 1.0f)); Then build and install the demo app on a Google Pixel Phone with Android 7.1, run the demo app, and play a 1080p video, for example, Misc -> Screens 1080p (FMP4, H264, No Audio)
please help.
Addressed in #4061.