[Libav-user] avcodec_open2 error when running encoding_decoding example

Masneri, Stefano stefano.masneri at brain.mpg.de
Tue Apr 26 14:56:31 CEST 2016


Hi

I was trying to update my application to FFmpeg 3.0 but I couldn't get it work.

To see what was going on I was trying to run the decoding_encoding.c example, and I keep getting an error, even though I don't change anything meaningful.

The function returning an error is
avcodec_open2(c, codec, NULL);

with returned value -22.

On the console I receive the following message:
Could not open codec
[libx264 @ 0000000000597180] Specified pixel format -1 is invalid or not supported

c->pix_fmt is AV_PIX_FMT_YUV420P;

I tried it as well with the latest snapshot, but the error remains. I am using windows 7 64 bit, the libraries I am using are the ones retrieved from zeranoe.

Any idea of what am I doing wrong?
Best,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160426/847443f8/attachment.html>


More information about the Libav-user mailing list