@abcfy2我这边编译成功了,x264 按这个网址编译
https://blog.7086.in/2013/09/07/2013-09-07-x264-on-debian/ffmpeg需要多打一个补丁(大部分都是trao_06的,就是qp_min_min那段是新的)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index d9130b2..a1637e4 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -48,6 +48,7 @@ typedef struct X264Context {
char *preset;
char *tune;
char *profile;
+ char *device;
char *level;
int fastfirstpass;
char *wpredp;
@@ -415,9 +416,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
if (avctx->scenechange_threshold >= 0)
x4->params.i_scenecut_threshold = avctx->scenechange_threshold;
if (avctx->qmin >= 0)
- x4->params.rc.i_qp_min = avctx->qmin;
+ x4->params.rc.i_qp_min_min = avctx->qmin;
if (avctx->qmax >= 0)
- x4->params.rc.i_qp_max = avctx->qmax;
+ x4->params.rc.i_qp_max_max = avctx->qmax;
if (avctx->max_qdiff >= 0)
x4->params.rc.i_qp_step = avctx->max_qdiff;
if (avctx->qblur >= 0)
@@ -531,8 +532,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
if (x4->nal_hrd >= 0)
x4->params.i_nal_hrd = x4->nal_hrd;
- if (x4->profile)
- if (x264_param_apply_profile(&x4->params, x4->profile) < 0) {
+ if (x4->profile || x4->device)
+ if (x264_param_apply_profile(&x4->params, x4->profile, x4->device) < 0) {
int i;
av_log(avctx, AV_LOG_ERROR, "Error setting profile %s.\n", x4->profile);
av_log(avctx, AV_LOG_INFO, "Possible profiles:");
@@ -707,8 +708,8 @@ static const AVOption options[] = {
{ "qp", "Constant quantization parameter rate control method",OFFSET(cqp), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE },
{ "aq-mode", "AQ method", OFFSET(aq_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE, "aq_mode"},
{ "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_NONE}, INT_MIN, INT_MAX, VE, "aq_mode" },
- { "variance", "Variance AQ (complexity mask)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_VARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" },
- { "autovariance", "Auto-variance AQ (experimental)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_AUTOVARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" },
+ { "variance", "Variance AQ (complexity mask)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_MIX}, INT_MIN, INT_MAX, VE, "aq_mode" },
+ { "autovariance", "Auto-variance AQ (experimental)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_AUTOMIX}, INT_MIN, INT_MAX, VE, "aq_mode" },
{ "aq-strength", "AQ strength. Reduces blocking and blurring in flat and textured areas.", OFFSET(aq_strength), AV_OPT_TYPE_FLOAT, {.dbl = -1}, -1, FLT_MAX, VE},
{ "psy", "Use psychovisual optimizations.", OFFSET(psy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE },
{ "psy-rd", "Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.", OFFSET(psy_rd), AV_OPT_TYPE_STRING, {0 }, 0, 0, VE},