aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-14 00:34:50 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-14 13:37:50 +0200
commit3aba391fb5c362ac089677538e9743e594e2dc95 (patch)
treef7bd1dbee7942e5a1cba0a6aa6fdcd0925fa7cc1
parent160df9797e68267d659b1481139198be0b36e1d1 (diff)
downloadffmpeg-3aba391fb5c362ac089677538e9743e594e2dc95.tar.gz
libx264: list possible presets and tunes.
The values are listed if setting them fails. Using "-preset help" or "-preset list" have that effect.
-rw-r--r--libavcodec/libx264.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 2ffdc7df9d..dd74081619 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -287,7 +287,16 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
if (x4->preset || x4->tune)
if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) {
+ int i;
av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune %s/%s.\n", x4->preset, x4->tune);
+ av_log(avctx, AV_LOG_INFO, "Possible presets:");
+ for (i = 0; x264_preset_names[i]; i++)
+ av_log(avctx, AV_LOG_INFO, " %s", x264_preset_names[i]);
+ av_log(avctx, AV_LOG_INFO, "\n");
+ av_log(avctx, AV_LOG_INFO, "Possible tunes:");
+ for (i = 0; x264_tune_names[i]; i++)
+ av_log(avctx, AV_LOG_INFO, " %s", x264_tune_names[i]);
+ av_log(avctx, AV_LOG_INFO, "\n");
return AVERROR(EINVAL);
}