Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frames were skipped when resuming video after pause #6901

Closed
michaelknoch opened this issue Jan 22, 2020 · 5 comments
Closed

frames were skipped when resuming video after pause #6901

michaelknoch opened this issue Jan 22, 2020 · 5 comments
Assignees
Labels

Comments

@michaelknoch
Copy link

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

@icbaker
Copy link
Collaborator

icbaker commented Jan 22, 2020

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.

@icbaker
Copy link
Collaborator

icbaker commented Jan 23, 2020

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?

@michaelknoch
Copy link
Author

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

@icbaker
Copy link
Collaborator

icbaker commented Jan 24, 2020

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.

@icbaker icbaker assigned andrewlewis and unassigned icbaker Jan 24, 2020
ojw28 added a commit that referenced this issue Jun 2, 2020
Issue: #6901
PiperOrigin-RevId: 314418536
@ojw28
Copy link
Contributor

ojw28 commented Jun 2, 2020

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!

@ojw28 ojw28 closed this as completed Jun 2, 2020
ojw28 added a commit that referenced this issue Jun 3, 2020
Issue: #6901
PiperOrigin-RevId: 314418536
@google google locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants