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

Split file have wrong length info #146

Closed
kkeonline opened this issue Apr 23, 2019 · 4 comments
Closed

Split file have wrong length info #146

kkeonline opened this issue Apr 23, 2019 · 4 comments
Labels

Comments

@kkeonline
Copy link

Splitting some MP4 file format, all the split output files showing the same length as original file
This happen only with some mp4 file, and after merge all split file into one the length is multiple by split part.
Original file length = 1hr
Split part#1 length 15sec (system info show 1hr)
Split part#2 length 5min (system show 1hr)
Split part#3 length 2min (system show 1hr)
Merge file length (7:15) (system show 3hr)

I try the same mp4 file with mp4spltter from mp4tool it work the correct job, the split file show correct length in player, however the mp4splitter interface is very suck.

2019-04-23_100947

@kkeonline
Copy link
Author

After switching from All stream to Primary stream the length is correct now.

attached picture showing wrong length info (split with all stream option)
2019-04-23_105255

@DGrv
Copy link

DGrv commented May 5, 2019

It seems that the issue #121 is also solved by this.
In v2.0.0 the 'Keyframe cut mode is now default'. I am wondering what is the goal of the default option 'all' (set output streams: Current include (and cut) all streams. Personally I would prefer the 'ps'as default. Or is it possible to have a config file where the user can decide which option to use at startup ?

@mifi
Copy link
Owner

mifi commented May 6, 2019

Great find @kkeonline and @DGrv

I though that it would make sense to include all streams by default, and not remove any data unless necessary. But if it causes a lot of issues I can be open for changing the default to PS instead. There is an issue for implementing settings saving, but I have not yet implemented that.

Seems that I changed this in 2a44d0b

I don't remember why I did it 🙈 if it was because of a particular issue or something.

I will add to the readme about this.

@mifi mifi added the bug label Feb 16, 2020
@mifi
Copy link
Owner

mifi commented Feb 19, 2020

The code is now changed to only include audio, video and subtitle streams by default (can be overridden.) I think the problem here was that some files contain proprietary binary streams that ffmpeg cannot cut, thus when including those they would stay the same length as before cutting, causing the video to also stay the same length. I've tested with gopro 6/7 and now it seems to work with both keyframe cut and normal cut. Reopen if still issue

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

No branches or pull requests

3 participants