Skip to content

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

@natalia-osa

Description

@natalia-osa

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions