androidx / androidx/media

Improve ability to seek frame by frame forward and backward

Open
#1,248 3 comments 1 reaction 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Apr 15, 2024.

enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 main branch

More version details

In my android application, user needs to identify the frame and then request for the process on the frame. When I pause the video and shift in frame backward or forward the behaviors is not correct. first time it always shifts frame to opposite direction.
Frame forward shift code:
val seekPositionForNewFrame = exoPlayer.currentPosition + ((1000 / fps))
exoplayer.seekTo(seekPositionForNewFrame)

Frame Backward shift code:
val seekPositionForNewFrame = exoPlayer.currentPosition - ((1000 / fps))
exoplayer.seekTo(seekPositionForNewFrame)

Mostly videos used are 60 fps.

Devices that reproduce the issue

Samsung x200.
Android virtual device PIXEL C tablet.

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

Play downloaded video,
pause video.
shift frame forward or backward.
on first time it always reproduces.

Expected result

Smooth shift to new frame

Actual result

First time it shifts to opposite direction, may the viual display and currentPosition is not synced properly.

Media

In the video share privately, I pause and then, hit previous frame every time. but on first frame its always forward shift

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.