[FFmpeg-devel] [PATCH] Fix libx264 profile listing

Mahendra M mahendra.m at gmail.com
Sat Sep 1 15:35:44 CEST 2012


If I invoke FFMPEG with -profile help for libx264, it lists the
presets instead. This patch fixes the listing.
Please do have a look.

Command output is given below (trimmed)

$ ffmpeg -y -i input.avi  -c:v libx264 -c:a -an -b:v 2000k  -profile:v
help -level 4 -preset fast -f mp4 abc.mp4
ffmpeg version N-43804-g780bf75 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 22 2012 11:54:39 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
x264 [error]: invalid profile: help
[libx264 @ 0x31f3000] Error setting profile help.
[libx264 @ 0x31f3000] Possible profiles: ultrafast superfast veryfast
faster fast medium


-------------- next part --------------
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 45fe2ac..6eddf7f 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -453,7 +453,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
             av_log(avctx, AV_LOG_ERROR, "Error setting profile %s.\n", x4->profile);
             av_log(avctx, AV_LOG_INFO, "Possible profiles:");
             for (i = 0; x264_profile_names[i]; i++)
-                av_log(avctx, AV_LOG_INFO, " %s", x264_preset_names[i]);
+                av_log(avctx, AV_LOG_INFO, " %s", x264_profile_names[i]);
             av_log(avctx, AV_LOG_INFO, "\n");
             return AVERROR(EINVAL);

More information about the ffmpeg-devel mailing list