Exoplayer: frames were skipped when resuming video after pause

Created on 22 Jan 2020  路  5Comments  路  Source: google/ExoPlayer

Issue description

I am facing an issue where ExoPlayer is somehow skipping frames on certain devices when playing a video after it has been paused. When resuming the video, exoplayer continues playback from stopped position + 200 to 500 ms (maybe it continues playback from one of the next/closest sync point). This may sound more like a nitpick to you, but our user experience highly depends on a smooth video playback.

I am happy to dig deep into the Exoplayer implementation to find a solution or at least a workaround for the issue, but maybe you guys already have an idea or a good starting point for me.

Reproduction steps

This issue was seen on a Samsung Galaxy A20e with Android 9 running sample/demo from this repository

Link to test content

happens for all videos of the demoapp

A full bug report captured from the device

bugreport-2020-01-22-13-46-54.zip

Version of ExoPlayer being used

Seen on version 2.9.0 and 2.11.1

Device(s) and version(s) of Android being used

Seen on Samsung Galaxy A20e with Android 9

bug

All 5 comments

Possibly relevant log line (i.e. 4 frames were dropped):

01-22 13:38:50.327 10257 21907 21907 D EventLogger: droppedFrames [eventTime=4.15, mediaPos=0.62, window=0, period=0, 4]

There are 53 other similar lines, always between 1 & 5 frames dropped.

I'll keep digging.

I don't see anything else suspicious in the logs - can you explain how you're observing this 200-500ms skip?

The logging I can see looks like mediaPos remains the same at the pause & resume events. e.g.
pause
01-22 13:39:29.736 10257 21907 21907 D EventLogger: isPlaying [eventTime=43.56, mediaPos=6.68, window=0, period=0, false]

resume
01-22 13:39:30.187 10257 21907 21907 D EventLogger: isPlaying [eventTime=44.01, mediaPos=6.68, window=0, period=0, true]

If there was a jump during the pause, it might be expected for the second mediaPos to be higher e.g. 6.88 for a 200ms jump.

I don't have access to an A20e I'm afraid, so I'm not able to reproduce it myself.

If this problem is visually obvious, maybe you could capture a screen recording using adb shell screenrecord?

thats interesting @icbaker, thanks for the insights. I can definitely constantly reproduce this with the mentioned samsung device. You can find a screen record via adb here

Thanks for the video, I'm also now able to reproduce locally.

Andrew's going to take a deeper look at what might be happening with timestamps to cause this.

The commit ref'd above should make resumption after pausing a lot smoother. It will make it into the 2.11.5 release. Please let us know if you have any feedback!

Was this page helpful?
0 / 5 - 0 ratings