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

Codec not found mpeg4 #7

Open
emrsn-mihailpopa opened this issue Jan 27, 2015 · 6 comments
Open

Codec not found mpeg4 #7

emrsn-mihailpopa opened this issue Jan 27, 2015 · 6 comments

Comments

@emrsn-mihailpopa
Copy link

I try to decode a video encoded using mpeg4 format (mp4v). When the library reaches the point where it searches for CODEC_ID_MPEG4, I get a message: "codec not found: mpeg4"

@VicenteFava
Copy link

I got the following:
codec not found: h264

Any solution?

@rafaelmaroxa
Copy link

@VicenteFava have you figured out something? I tried multiple configurations, but I am still seeing the same problem. halp

@VicenteFava
Copy link

Sorry @rafaelmaroxa, I haven't found a solution. I tried different configurations too.

@fzakaria
Copy link

So, i'm not sure why but on iPhone you have h264 as decoder and libx264 as encoder for lookup.

I added the following line:

- (id) initWithOutputFile:(FFOutputFile*)outputFile outputCodec:(NSString*)outputCodec {
    if (self = [super initWithFile:outputFile]) {
        self.lastMuxDTS = AV_NOPTS_VALUE;
        self.frameNumber = 0;

        if ([outputCodec  isEqual: @"h264"]){
            outputCodec = @"libx264";
        }

        AVCodec *codec = avcodec_find_encoder_by_name([outputCodec UTF8String]);
        if (!codec) {
            NSLog(@"codec not found: %@", outputCodec);
        }
        self.stream = avformat_new_stream(outputFile.formatContext, codec);
        [outputFile addOutputStream:self];
    }
    return self;
}

@netsutra
Copy link

Please help me to get a solution for this problem.

@Gigibit
Copy link

Gigibit commented Oct 12, 2018

have you solved this issue?

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

6 participants