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

mp4fragment : bad random access points #121

Closed
jojolalpin opened this issue Jan 4, 2017 · 1 comment
Closed

mp4fragment : bad random access points #121

jojolalpin opened this issue Jan 4, 2017 · 1 comment

Comments

@jojolalpin
Copy link

Hi,

Just FYI, I found that when you fragment a mp4 with mp4fragment, every frame in video track becomes a random access point instead of only I frames. RAP indicator becomes the same as for an audio track.
I found this looking for a way to correct videos encoded with Elemental that had the same behavior (Elemental said it was a bug soon to be corrected).
Then, if you expect to seek frame by frame with the video, it fails (at least on videojs, vlc and other desktop video players do not seem to rely on RAP indicator)

Note: You can get RAP indicator with command : MP4Box -dts video.mp4 (Maybe there is a bento command to get it too).

BR,

@barbibulle
Copy link
Contributor

barbibulle commented Jan 5, 2017

mp4fragment relies on the information from its input file to decide which frames are RAP frames. Some encoders incorrectly mark all video frames as 'sync' frames, and mp4fragment trusts that information, even though it is buggy.
You can check your input file with "mp4info --show-samples <input.mp4>"
In the part where the video samples are listed, you'll see an entry for each sample, and a [S] to indicate which samples are maked as 'sync' samples (which will be the same in the output). You'll also see a frame type marker for I frames, P frames and B frames.

Example:
...

[000001] size= 44717 duration=   125 [S] <I>
[000002] size=   459 duration=   125     <P>
[000003] size=   372 duration=   125     <B>
[000004] size=   434 duration=   125     <P>
[000005] size=   364 duration=   125     <B>
[000006] size=   434 duration=   125     <P>

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants