[FFmpeg-user] Error message 'Could not open codec' when running FFMPEG-codec.

Anders Branderud anders.branderud at gmail.com
Sun Mar 18 19:52:53 CET 2012


Thanks for the reply!
Yes, the other parameters are the same.
I did set max_b_frames= 0. However the error message remains after
compiling again.

>
> > I am running the following code:
> >
> >
> https://docs.google.com/document/d/1DbNpoy0MHNjS3ZV-6plaVdbmvW6g08riqtIz6fBO3ZE/edit
> >
> > Some excerpts:
> > video_encode_example("/home/anders/grb_1.mpg", CODEC_ID_MPEG4);
> >
> > static void video_encode_example(const char *filename, int codec_id)
> > {
> >  {
> >   //For full code see document attached above.
> >     /* open it */
> >    if (avcodec_open2(c, codec, NULL) < 0) {
> >        fprintf(stderr, "could not open codec\n");
> >        exit(1);
> >    }
> >
> > }
> >
> > The message 'could not open codec' is printed out.
> > video_encode_example("/home/anders/grb_1.mpg", CODEC_ID_MPEG2VIDEO);
> > generates the same error message.
> >
> > How do I resolve this?
> > Thanks in advance!
> >
> >
> There's probably a wrong parameter with AVCodecContext.
>
> Off the top of my head I can't remember if CODEC_ID_MPEG2VIDEO and
> CODEC_ID_MPEG4 support b frames but I would try to set max_b_frames to 0.
>
> Are all the other parameters the same as the example?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
*Kind regards,*

[Personal blog] Will of the
Creator<http://www.proofexistencegod.com/will-of-god/will-of-god/>  :
Logical
reasons - based on scientific premises - for the existence of a Super
intelligent and Orderly Creator and that He hasn't left His sapient
creatures without an Instruction Manual - Torah ['books of Moses'] - to
ascertain, and aspire to, His purpose.

[Company] Anders Branderud IT Solutions - www.abitsolutions.org


More information about the ffmpeg-user mailing list