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

Library converts mkv -> mp4 incorrectly, file cannot be opened #17

Open
natalia-osa opened this issue Jul 11, 2016 · 0 comments
Open

Library converts mkv -> mp4 incorrectly, file cannot be opened #17

natalia-osa opened this issue Jul 11, 2016 · 0 comments

Comments

@natalia-osa
Copy link

natalia-osa commented Jul 11, 2016

Using the following code:

FFmpegWrapper *ffmpegWrapper = [[FFmpegWrapper alloc] init];
[ffmpegWrapper convertInputPath:mkvVideoFilePath outputPath:mp4VideoFilePath options:nil progressBlock:^(NSUInteger bytesRead, uint64_t totalBytesRead, uint64_t totalBytesExpectedToRead) {
    NSLog(@"Progress: %.2f", (float)totalBytesRead / totalBytesExpectedToRead);
} completionBlock:^(BOOL success, NSError *error) {
    if (success && !error) {
        // delete mp4 file
    } else {
        if (error) {
            DDLogError(@"MKV -> MP4 conversion: Error occured: %@", error.localizedDescription);
            // do something else with the error
        } else {
            DDLogError(@"MKV -> MP4 conversion: Unknown error occured.");
        }
        // check if mkv also needs to be deleted
}];

Problems:

  1. The video is unplayable.
  2. Output mp4 is 5 minutes long, while input mkv is 11 seconds long.
  3. Console is flooded with logs.
  4. Even though everything failed, the completionBlock is called with success = YES, error = nil.

My console looks like the linked gist file (FFmpegWrapper is basically spamming with logs, 30k lines generated for 11s .mkv movie, it's really long so I don't want to attach it here).

I'm using the version from:
pod 'FFmpegWrapper-up-to-date', '~> 1.2'

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

1 participant