diff options
author | James Almer | 2015-04-10 16:47:03 -0300 |
---|---|---|
committer | James Almer | 2015-04-10 16:47:29 -0300 |
commit | 61090db29a3e8364431d46c16770425815f7608a (patch) | |
tree | d29633b5e9de753203700530027fe37a3a2ba443 /libavcodec/libx265.c | |
parent | bc48c88918f767e0dffcd138ae8e5c3052e8a92f (diff) |
avcodec/libx265: print supported presets and tunes on error
Based on code from libavcodec/libx264.c
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r-- | libavcodec/libx265.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 19217b0208..ed453e362b 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -100,7 +100,20 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) } if (x265_param_default_preset(ctx->params, ctx->preset, ctx->tune) < 0) { - av_log(avctx, AV_LOG_ERROR, "Invalid preset or tune.\n"); + int i; + + av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune %s/%s.\n", ctx->preset, ctx->tune); + av_log(avctx, AV_LOG_INFO, "Possible presets:"); + for (i = 0; x265_preset_names[i]; i++) + av_log(avctx, AV_LOG_INFO, " %s", x265_preset_names[i]); + + av_log(avctx, AV_LOG_INFO, "\n"); + av_log(avctx, AV_LOG_INFO, "Possible tunes:"); + for (i = 0; x265_tune_names[i]; i++) + av_log(avctx, AV_LOG_INFO, " %s", x265_tune_names[i]); + + av_log(avctx, AV_LOG_INFO, "\n"); + return AVERROR(EINVAL); } |