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

When applying an MP4 edit list, preroll and skip samples from a keyframe to the start of an edit #1659

Closed
sanmall opened this issue Jul 8, 2016 · 4 comments

Comments

@sanmall
Copy link

sanmall commented Jul 8, 2016

video recorded from ios can not play in front of a few seconds, but the audio is ok.

@ojw28 ojw28 added the bug label Jul 8, 2016
@andrewlewis
Copy link
Collaborator

This file contains an edit list that skips the first video frame, which is a keyframe. Due to a limitation in how we handle edit lists (see this comment) we don't send the frame to the decoder, which means samples are dropped up to the next key-frame. This is why video starts playing late.

I'll use this issue to track the enhancement of extracting and skipping samples from the latest keyframe at/before an edit up to the start of the edit. I think it's unlikely we will prioritize it in the near future, unless we find that this type of stream is common. Thanks!

@andrewlewis andrewlewis changed the title video recorded from ios can not play in front of a few seconds When applying an MP4 edit list, preroll and skip samples from a keyframe to the start of an edit Jul 18, 2016
@greyson-signal
Copy link

Hi there, just wanted to say that we're hitting this issue at Signal. Videos recorded by iOS devices that are then sent and played back by ExoPlayer on an Android device will sometimes run into this. It doesn't seem to be all videos transcoded by iOS, but some.

copybara-service bot pushed a commit to androidx/media that referenced this issue Sep 11, 2024
When processing edit lists in MP4 files, the media start position may be a non-keyframe. To ensure proper playback, the decoder must preroll to the preceding keyframe, as these preroll samples are essential for decoding but are not rendered.

Issue: google/ExoPlayer#1659

#cherrypick

PiperOrigin-RevId: 673457615
@rohitjoins
Copy link
Contributor

This issue has now been fixed.

@google google locked and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants