[Libav-user] [libav-user] avcodec_open2 cannot open h264 codec

Marika Marszalkowski marikaner at gmail.com
Fri Oct 11 21:29:52 CEST 2013


Hello everyone,

I am trying to encode an .mkv file from jpeg images. Opening the codec with
avcodec_open2 fails with the following error:

[libx264 @ 0x7fffb8003200] broken ffmpeg default settings detected

[libx264 @ 0x7fffb8003200] use an encoding preset (e.g. -vpre medium)

[libx264 @ 0x7fffb8003200] preset usage: -vpre <speed> -vpre <profile>

[libx264 @ 0x7fffb8003200] speed presets are listed in x264 --help

[libx264 @ 0x7fffb8003200] profile is optional; x264 defaults to high


Those are the settings I am using:


   pCodecCtx = pVideoStream->codec;

   pCodecCtx->codec_id = pOutputFormat->video_codec;

   pCodecCtx->codec_type = AVMEDIA_TYPE_VIDEO;


   pCodecCtx->bit_rate = Bitrate;

   pCodecCtx->width = getWidth();

   pCodecCtx->height = getHeight();

   pCodecCtx->time_base.den = fps;

   pCodecCtx->time_base.num = 1;

   pCodecCtx->gop_size = Gop;

   pCodecCtx->pix_fmt = PIX_FMT_YUV420P;

   pCodecCtx->thread_count = 10;


And this is what av_dump_format gives me:


Output #0, matroska, to '/home/marika/test.mkv':

Stream #0:0: Video: h264, yuv420p, 1920x1080, q=2-31, 50 kb/s, 90k tbn, 30 tbc


Any ideas?


Thanks

Marika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131011/a4b30a23/attachment.html>


More information about the Libav-user mailing list