Hello,
avcodec_open() is returning -1 when I try to open the MJPEG encoder.
However, avcodec_open() succeeds when creating the MPEG-4 encoder with the
same context settings.
Here's the code that *fails* with MJPEG and *succeeds* with MPEG-4:
Thx!
-----
AVCodec* _codec;
AVCodecContext* _codecContext;
-----
avcodec_register_all();
avcodec_get_context_defaults2( _codecContext, CODEC_TYPE_VIDEO );
_codecContext->codec_id = CODEC_ID_MJPEG; //MPEG4
_codecContext->codec_type = CODEC_TYPE_VIDEO;
_codecContext->time_base.num = 1;
_codecContext->time_base.den = 30;
_codecContext->pix_fmt = PIX_FMT_YUV420P;
_codecContext->bit_rate = 1024 * 1024;
_codecContext->width = 704;
_codecContext->height = 480;
_codec = avcodec_find_encoder(CODEC_ID_MJPEG); // MPEG4
int res = avcodec_open( _codecContext, _codec );
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user