[libx264 @ 00021bb0]broken ffmpeg default settings detected
[libx264 @ 00021bb0]use an encoding preset (vpre)
solution:
find the log message in the x264 source file encoder/encoder.c
/* Detect default ffmpeg settings and terminate with an error. */
{
int score = 0;
score += h->param.analyse.i_me_range == 0;
score += h->param.rc.i_qp_step == 3;
score += h->param.i_keyint_max == 12;
score += h->param.rc.i_qp_min == 2;
score += h->param.rc.i_qp_max == 31;
score += h->param.rc.f_qcompress == 0.5;
score += fabs(h->param.rc.f_ip_factor - 1.25) < 0.01;
score += fabs(h->param.rc.f_pb_factor - 1.25) < 0.01;
score += h->param.analyse.inter == 0 &&
h->param.analyse.i_subpel_refine == 8;
if( score >= 5 )
{
x264_log( h, X264_LOG_ERROR, "broken ffmpeg default settings
detected\n" );
x264_log( h, X264_LOG_ERROR, "use an encoding preset (vpre)\n"
);
return -1;
}
}
We can see that if score >= 5,the function to open the codec will fail.
We must at least set 4 param of the AVCodecContext before open it.
/*default settings for x264*/
ctx->me_range = 16;
ctx->max_qdiff = 4;
ctx->qmin = 10;
ctx->qmax = 51;
ctx->qcompress = 0.6;
build, link, run
It works!!
enjoy!
On Tue, Jun 15, 2010 at 8:49 PM, Mark Kenna <
[email protected]> wrote:
> Hi
>
> I am attempting to modify api_example.c to encode to a CODEC_ID_H264. I am
> having some trouble and it's possibly due to my lack of knowledge on the
> sample parameters. Can someone please suggest whether there is something
> extra that needs to be done to encode H264?
>
> Thanks,
> Mark.
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user