* [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description
@ 2023-08-26 1:10 Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 2/3] lavc: clarify meaning of avctx.level option Stefano Sabatini
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Stefano Sabatini @ 2023-08-26 1:10 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Stefano Sabatini
Also, merge x264opts and x264-opts option docs to avoid duplication
and make it even more clearer they provide the same functionality.
---
doc/encoders.texi | 66 ++++++++++++++++++++++++++---------------------
1 file changed, 37 insertions(+), 29 deletions(-)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 6f8f5e127e..947b0c3320 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -2418,6 +2418,10 @@ To get a more accurate and extensive documentation of the libx264
options, invoke the command @command{x264 --fullhelp} or consult
the libx264 documentation.
+In the list below, note that the @command{x264} option name is shown
+in parentheses after the libavcodec corresponding name, in case there
+is a direct mapping.
+
@table @option
@item b (@emph{bitrate})
Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
@@ -2425,17 +2429,19 @@ expressed in bits/s, while @command{x264}'s @option{bitrate} is in
kilobits/s.
@item bf (@emph{bframes})
+Number of B-frames between I and P-frames
@item g (@emph{keyint})
+Maximum GOP size
@item qmin (@emph{qpmin})
-Minimum quantizer scale.
+Minimum quantizer scale
@item qmax (@emph{qpmax})
-Maximum quantizer scale.
+Maximum quantizer scale
@item qdiff (@emph{qpstep})
-Maximum difference between quantizer scales.
+Maximum difference between quantizer scales
@item qblur (@emph{qblur})
Quantizer curve blur
@@ -2444,7 +2450,7 @@ Quantizer curve blur
Quantizer curve compression factor
@item refs (@emph{ref})
-Number of reference frames each P-frame can use. The range is from @var{0-16}.
+Number of reference frames each P-frame can use. The allowed range is @var{0-16}.
@item sc_threshold (@emph{scenecut})
Sets the threshold for the scene change detection.
@@ -2452,7 +2458,8 @@ Sets the threshold for the scene change detection.
@item trellis (@emph{trellis})
Performs Trellis quantization to increase efficiency. Enabled by default.
-@item nr (@emph{nr})
+@item nr (@emph{nr})
+Noise reduction
@item me_range (@emph{merange})
Maximum range of the motion search in pixels.
@@ -2533,6 +2540,7 @@ open GOP by setting it to @code{-cgop}. The result is similar to
the behavior of @command{x264}'s @option{--open-gop} option.
@item rc_init_occupancy (@emph{vbv-init})
+Initial VBV buffer occupancy
@item preset (@emph{preset})
Set the encoding preset.
@@ -2578,7 +2586,7 @@ Set AQ strength, reduce blocking and blurring in flat and textured areas.
Use psychovisual optimizations when set to 1. When set to 0, it has the
same effect as @command{x264}'s @option{--no-psy} option.
-@item psy-rd (@emph{psy-rd})
+@item psy-rd (@emph{psy-rd})
Set strength of psychovisual optimization, in
@var{psy-rd}:@var{psy-trellis} format.
@@ -2610,7 +2618,7 @@ to 1.
@item avcintra-class (@emph{class})
Configure the encoder to generate AVC-Intra.
-Valid values are 50,100 and 200
+Valid values are 50, 100 and 200
@item bluray-compat (@emph{bluray-compat})
Configure the encoder to be compatible with the bluray standard.
@@ -2661,8 +2669,8 @@ Set loop filter parameters, in @var{alpha}:@var{beta} form.
Set fluctuations reduction in QP (before curve compression).
@item partitions (@emph{partitions})
-Set partitions to consider as a comma-separated list of. Possible
-values in the list:
+Set partitions to consider as a comma-separated list of
+values. Possible values in the list:
@table @samp
@item p8x8
@@ -2718,19 +2726,33 @@ Variable bit rate.
Constant bit rate (not allowed in MP4 container).
@end table
-@item x264opts (N.A.)
-Set any x264 option, see @command{x264 --fullhelp} for a list.
+@item x264opts @var{opts}
+@item x264-params @var{opts}
+Override the x264 configuration using a :-separated list of key=value
+options.
-Argument is a list of @var{key}=@var{value} couples separated by
-":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
-themselves, use "," instead. They accept it as well since long ago but this
-is kept undocumented for some reason.
+@option{x264-param} is functionally the same as the @option{x264opts},
+but is duplicated for compatibility with the Libav fork.
+
+The argument for both options is a list of @var{key}=@var{value}
+couples separated by ":". In @var{filter} and @var{psy-rd} options
+that use ":" as a separator themselves, use "," instead. They accept
+it as well since long ago but this is kept undocumented for some
+reason.
+
+For example, the options might be provided as:
+@example
+level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0
+@end example
For example to specify libx264 encoding options with @command{ffmpeg}:
@example
ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
@end example
+To get the complete list of the libx264 options, invoke the command
+@command{x264 --fullhelp} or consult the libx264 documentation.
+
@item a53cc @var{boolean}
Import closed captions (which must be ATSC compatible format) into output.
Only the mpeg2 and h264 decoders provide these. Default is 1 (on).
@@ -2741,20 +2763,6 @@ Import user data unregistered SEI if available into output. Default is 0 (off).
@item mb_info @var{boolean}
Set mb_info data through AVFrameSideData, only useful when used from the
API. Default is 0 (off).
-
-@item x264-params (N.A.)
-Override the x264 configuration using a :-separated list of key=value
-parameters.
-
-This option is functionally the same as the @option{x264opts}, but is
-duplicated for compatibility with the Libav fork.
-
-For example to specify libx264 encoding options with @command{ffmpeg}:
-@example
-ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
-cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
-no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
-@end example
@end table
Encoding ffpresets for common usages are provided so they can be used with the
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] lavc: clarify meaning of avctx.level option
2023-08-26 1:10 [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
@ 2023-08-26 1:10 ` Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option Stefano Sabatini
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Stefano Sabatini @ 2023-08-26 1:10 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Stefano Sabatini
---
doc/codecs.texi | 5 ++++-
libavcodec/avcodec.h | 4 +++-
libavcodec/options_table.h | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/doc/codecs.texi b/doc/codecs.texi
index f903dad754..0aa848f62f 100644
--- a/doc/codecs.texi
+++ b/doc/codecs.texi
@@ -697,10 +697,13 @@ profiles are documented in the relevant encoder documentation.
@item level @var{integer} (@emph{encoding,audio,video})
+Set the encoder level. This level depends on the specific codec, and
+might correspond to the profile level. It is set by default to
+@samp{unknown}.
+
Possible values:
@table @samp
@item unknown
-
@end table
@item lowres @var{integer} (@emph{decoding,audio,video})
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 649411ac79..50d2086c13 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1722,7 +1722,9 @@ typedef struct AVCodecContext {
/**
* level
- * - encoding: Set by user.
+ * - encoding: Set by user, corresponds to a specific level defined by the
+ * codec, usually corresponding to the profile level, if not specified it
+ * set to FF_LEVEL_UNKNOWN
* - decoding: Set by libavcodec.
*/
int level;
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index bb4b894b06..5f0d674dbe 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -226,7 +226,7 @@ static const AVOption avcodec_options[] = {
{"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.profile"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.profile"},
{"main10", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, V|E, "avctx.profile"},
-{"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.level"},
+{"level", "encoding level, usually corresponding to the profile level, codec-specific", OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.level"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.level"},
{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D},
{"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option
2023-08-26 1:10 [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 2/3] lavc: clarify meaning of avctx.level option Stefano Sabatini
@ 2023-08-26 1:10 ` Stefano Sabatini
2023-09-06 5:37 ` Gyan Doshi
2023-09-05 23:11 ` [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-09-06 5:34 ` Gyan Doshi
3 siblings, 1 reply; 10+ messages in thread
From: Stefano Sabatini @ 2023-08-26 1:10 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Stefano Sabatini
Address trac issue:
http://trac.ffmpeg.org/ticket/3947
---
doc/encoders.texi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 947b0c3320..b7fbc25f92 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -2452,6 +2452,14 @@ Quantizer curve compression factor
@item refs (@emph{ref})
Number of reference frames each P-frame can use. The allowed range is @var{0-16}.
+@item level
+Only when set from the @code{AVCodecContext} API and the value is
+positive, sets the @code{x264_param_t.i_level_idc} value. This is
+overridden when setting the private option @option{level}.
+
+@item level (@emph{level})
+Specify level string (as defined by H.264 Annex A).
+
@item sc_threshold (@emph{scenecut})
Sets the threshold for the scene change detection.
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description
2023-08-26 1:10 [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 2/3] lavc: clarify meaning of avctx.level option Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option Stefano Sabatini
@ 2023-09-05 23:11 ` Stefano Sabatini
2023-09-06 5:34 ` Gyan Doshi
3 siblings, 0 replies; 10+ messages in thread
From: Stefano Sabatini @ 2023-09-05 23:11 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On date Saturday 2023-08-26 03:10:28 +0200, Stefano Sabatini wrote:
> Also, merge x264opts and x264-opts option docs to avoid duplication
> and make it even more clearer they provide the same functionality.
> ---
> doc/encoders.texi | 66 ++++++++++++++++++++++++++---------------------
> 1 file changed, 37 insertions(+), 29 deletions(-)
Ping on the patchset.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description
2023-08-26 1:10 [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
` (2 preceding siblings ...)
2023-09-05 23:11 ` [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
@ 2023-09-06 5:34 ` Gyan Doshi
2023-11-04 21:26 ` Stefano Sabatini
3 siblings, 1 reply; 10+ messages in thread
From: Gyan Doshi @ 2023-09-06 5:34 UTC (permalink / raw)
To: ffmpeg-devel
On 2023-08-26 06:40 am, Stefano Sabatini wrote:
> Also, merge x264opts and x264-opts option docs to avoid duplication
> and make it even more clearer they provide the same functionality.
> ---
> doc/encoders.texi | 66 ++++++++++++++++++++++++++---------------------
> 1 file changed, 37 insertions(+), 29 deletions(-)
>
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 6f8f5e127e..947b0c3320 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -2418,6 +2418,10 @@ To get a more accurate and extensive documentation of the libx264
> options, invoke the command @command{x264 --fullhelp} or consult
> the libx264 documentation.
>
> +In the list below, note that the @command{x264} option name is shown
> +in parentheses after the libavcodec corresponding name, in case there
> +is a direct mapping.
> +
> @table @option
> @item b (@emph{bitrate})
> Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
> @@ -2425,17 +2429,19 @@ expressed in bits/s, while @command{x264}'s @option{bitrate} is in
> kilobits/s.
>
> @item bf (@emph{bframes})
> +Number of B-frames between I and P-frames
>
> @item g (@emph{keyint})
> +Maximum GOP size
>
> @item qmin (@emph{qpmin})
> -Minimum quantizer scale.
> +Minimum quantizer scale
>
> @item qmax (@emph{qpmax})
> -Maximum quantizer scale.
> +Maximum quantizer scale
>
> @item qdiff (@emph{qpstep})
> -Maximum difference between quantizer scales.
> +Maximum difference between quantizer scales
>
> @item qblur (@emph{qblur})
> Quantizer curve blur
> @@ -2444,7 +2450,7 @@ Quantizer curve blur
> Quantizer curve compression factor
>
> @item refs (@emph{ref})
> -Number of reference frames each P-frame can use. The range is from @var{0-16}.
> +Number of reference frames each P-frame can use. The allowed range is @var{0-16}.
Allowed is implicit in the statement. Also, most statements of range
don't contain allow so prefer to keep it consistent.
> @item sc_threshold (@emph{scenecut})
> Sets the threshold for the scene change detection.
> @@ -2452,7 +2458,8 @@ Sets the threshold for the scene change detection.
> @item trellis (@emph{trellis})
> Performs Trellis quantization to increase efficiency. Enabled by default.
>
> -@item nr (@emph{nr})
> +@item nr (@emph{nr})
> +Noise reduction
>
> @item me_range (@emph{merange})
> Maximum range of the motion search in pixels.
> @@ -2533,6 +2540,7 @@ open GOP by setting it to @code{-cgop}. The result is similar to
> the behavior of @command{x264}'s @option{--open-gop} option.
>
> @item rc_init_occupancy (@emph{vbv-init})
> +Initial VBV buffer occupancy
>
> @item preset (@emph{preset})
> Set the encoding preset.
> @@ -2578,7 +2586,7 @@ Set AQ strength, reduce blocking and blurring in flat and textured areas.
> Use psychovisual optimizations when set to 1. When set to 0, it has the
> same effect as @command{x264}'s @option{--no-psy} option.
>
> -@item psy-rd (@emph{psy-rd})
> +@item psy-rd (@emph{psy-rd})
> Set strength of psychovisual optimization, in
> @var{psy-rd}:@var{psy-trellis} format.
>
> @@ -2610,7 +2618,7 @@ to 1.
>
> @item avcintra-class (@emph{class})
> Configure the encoder to generate AVC-Intra.
> -Valid values are 50,100 and 200
> +Valid values are 50, 100 and 200
>
> @item bluray-compat (@emph{bluray-compat})
> Configure the encoder to be compatible with the bluray standard.
> @@ -2661,8 +2669,8 @@ Set loop filter parameters, in @var{alpha}:@var{beta} form.
> Set fluctuations reduction in QP (before curve compression).
>
> @item partitions (@emph{partitions})
> -Set partitions to consider as a comma-separated list of. Possible
> -values in the list:
> +Set partitions to consider as a comma-separated list of
> +values. Possible values in the list:
>
> @table @samp
> @item p8x8
> @@ -2718,19 +2726,33 @@ Variable bit rate.
> Constant bit rate (not allowed in MP4 container).
> @end table
>
> -@item x264opts (N.A.)
> -Set any x264 option, see @command{x264 --fullhelp} for a list.
> +@item x264opts @var{opts}
> +@item x264-params @var{opts}
> +Override the x264 configuration using a :-separated list of key=value
> +options.
>
> -Argument is a list of @var{key}=@var{value} couples separated by
> -":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
> -themselves, use "," instead. They accept it as well since long ago but this
> -is kept undocumented for some reason.
> +@option{x264-param} is functionally the same as the @option{x264opts},
> +but is duplicated for compatibility with the Libav fork.
There is a difference, in that x264opts accepts boolean args without a
value.
> +
> +The argument for both options is a list of @var{key}=@var{value}
> +couples separated by ":". In @var{filter} and @var{psy-rd} options
> +that use ":" as a separator themselves, use "," instead. They accept
> +it as well since long ago but this is kept undocumented for some
> +reason.
> +
> +For example, the options might be provided as:
> +@example
> +level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0
> +@end example
>
> For example to specify libx264 encoding options with @command{ffmpeg}:
> @example
> ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
> @end example
>
> +To get the complete list of the libx264 options, invoke the command
> +@command{x264 --fullhelp} or consult the libx264 documentation.
May want to make it clear that x264 refers to the standalone CLI tool.
Regards,
Gyan
> +
> @item a53cc @var{boolean}
> Import closed captions (which must be ATSC compatible format) into output.
> Only the mpeg2 and h264 decoders provide these. Default is 1 (on).
> @@ -2741,20 +2763,6 @@ Import user data unregistered SEI if available into output. Default is 0 (off).
> @item mb_info @var{boolean}
> Set mb_info data through AVFrameSideData, only useful when used from the
> API. Default is 0 (off).
> -
> -@item x264-params (N.A.)
> -Override the x264 configuration using a :-separated list of key=value
> -parameters.
> -
> -This option is functionally the same as the @option{x264opts}, but is
> -duplicated for compatibility with the Libav fork.
> -
> -For example to specify libx264 encoding options with @command{ffmpeg}:
> -@example
> -ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
> -cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
> -no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
> -@end example
> @end table
>
> Encoding ffpresets for common usages are provided so they can be used with the
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option Stefano Sabatini
@ 2023-09-06 5:37 ` Gyan Doshi
2023-10-06 7:54 ` Stefano Sabatini
0 siblings, 1 reply; 10+ messages in thread
From: Gyan Doshi @ 2023-09-06 5:37 UTC (permalink / raw)
To: ffmpeg-devel
On 2023-08-26 06:40 am, Stefano Sabatini wrote:
> Address trac issue:
> http://trac.ffmpeg.org/ticket/3947
> ---
> doc/encoders.texi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 947b0c3320..b7fbc25f92 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -2452,6 +2452,14 @@ Quantizer curve compression factor
> @item refs (@emph{ref})
> Number of reference frames each P-frame can use. The allowed range is @var{0-16}.
>
> +@item level
> +Only when set from the @code{AVCodecContext} API and the value is
> +positive, sets the @code{x264_param_t.i_level_idc} value. This is
> +overridden when setting the private option @option{level}.
> +
> +@item level (@emph{level})
> +Specify level string (as defined by H.264 Annex A).
> +
> @item sc_threshold (@emph{scenecut})
> Sets the threshold for the scene change detection.
>
LGTM.
Regards,
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option
2023-09-06 5:37 ` Gyan Doshi
@ 2023-10-06 7:54 ` Stefano Sabatini
0 siblings, 0 replies; 10+ messages in thread
From: Stefano Sabatini @ 2023-10-06 7:54 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On date Wednesday 2023-09-06 11:07:23 +0530, Gyan Doshi wrote:
> On 2023-08-26 06:40 am, Stefano Sabatini wrote:
> > Address trac issue:
> > http://trac.ffmpeg.org/ticket/3947
> > ---
> > doc/encoders.texi | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/doc/encoders.texi b/doc/encoders.texi
> > index 947b0c3320..b7fbc25f92 100644
> > --- a/doc/encoders.texi
> > +++ b/doc/encoders.texi
> > @@ -2452,6 +2452,14 @@ Quantizer curve compression factor
> > @item refs (@emph{ref})
> > Number of reference frames each P-frame can use. The allowed range is @var{0-16}.
> > +@item level
> > +Only when set from the @code{AVCodecContext} API and the value is
> > +positive, sets the @code{x264_param_t.i_level_idc} value. This is
> > +overridden when setting the private option @option{level}.
> > +
> > +@item level (@emph{level})
> > +Specify level string (as defined by H.264 Annex A).
Applied (with some more edits).
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description
2023-09-06 5:34 ` Gyan Doshi
@ 2023-11-04 21:26 ` Stefano Sabatini
2023-11-19 11:34 ` Stefano Sabatini
0 siblings, 1 reply; 10+ messages in thread
From: Stefano Sabatini @ 2023-11-04 21:26 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]
On date Wednesday 2023-09-06 11:04:49 +0530, Gyan Doshi wrote:
[...]
Sorry for the slow reply.
> > -Argument is a list of @var{key}=@var{value} couples separated by
> > -":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
> > -themselves, use "," instead. They accept it as well since long ago but this
> > -is kept undocumented for some reason.
> > +@option{x264-param} is functionally the same as the @option{x264opts},
> > +but is duplicated for compatibility with the Libav fork.
>
> There is a difference, in that x264opts accepts boolean args without a
> value.
Right.
> > +
> > +The argument for both options is a list of @var{key}=@var{value}
> > +couples separated by ":". In @var{filter} and @var{psy-rd} options
> > +that use ":" as a separator themselves, use "," instead. They accept
> > +it as well since long ago but this is kept undocumented for some
> > +reason.
> > +
> > +For example, the options might be provided as:
> > +@example
> > +level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0
> > +@end example
> > For example to specify libx264 encoding options with @command{ffmpeg}:
> > @example
> > ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
> > @end example
> > +To get the complete list of the libx264 options, invoke the command
> > +@command{x264 --fullhelp} or consult the libx264 documentation.
>
> May want to make it clear that x264 refers to the standalone CLI tool.
Isn't that clear enough? (we use the same formula in other places,
e.g. in x265 docs).
[-- Attachment #2: 0001-doc-encoders-libx264-review-and-extend-option-descri.patch --]
[-- Type: text/x-diff, Size: 6213 bytes --]
From a11eafe5a61a572f4e9ab9e4ab9907bba98300e4 Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefasab@gmail.com>
Date: Sat, 26 Aug 2023 01:10:09 +0200
Subject: [PATCH] doc/encoders/libx264: review and extend option description
Also, merge x264opts and x264-opts option docs to avoid duplication
and make it clearer that they provide mostly the same functionality.
---
doc/encoders.texi | 65 ++++++++++++++++++++++++++---------------------
1 file changed, 36 insertions(+), 29 deletions(-)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 8b2ab937d1..f2aba10627 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -2421,6 +2421,10 @@ To get a more accurate and extensive documentation of the libx264
options, invoke the command @command{x264 --fullhelp} or consult
the libx264 documentation.
+In the list below, note that the @command{x264} option name is shown
+in parentheses after the libavcodec corresponding name, in case there
+is a direct mapping.
+
@table @option
@item b (@emph{bitrate})
Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
@@ -2428,17 +2432,19 @@ expressed in bits/s, while @command{x264}'s @option{bitrate} is in
kilobits/s.
@item bf (@emph{bframes})
+Number of B-frames between I and P-frames
@item g (@emph{keyint})
+Maximum GOP size
@item qmin (@emph{qpmin})
-Minimum quantizer scale.
+Minimum quantizer scale
@item qmax (@emph{qpmax})
-Maximum quantizer scale.
+Maximum quantizer scale
@item qdiff (@emph{qpstep})
-Maximum difference between quantizer scales.
+Maximum difference between quantizer scales
@item qblur (@emph{qblur})
Quantizer curve blur
@@ -2447,7 +2453,7 @@ Quantizer curve blur
Quantizer curve compression factor
@item refs (@emph{ref})
-Number of reference frames each P-frame can use. The range is from @var{0-16}.
+Number of reference frames each P-frame can use. The range is @var{0-16}.
@item level (@emph{level})
Set the @code{x264_param_t.i_level_idc} value in case the value is
@@ -2469,7 +2475,8 @@ Sets the threshold for the scene change detection.
@item trellis (@emph{trellis})
Performs Trellis quantization to increase efficiency. Enabled by default.
-@item nr (@emph{nr})
+@item nr (@emph{nr})
+Noise reduction
@item me_range (@emph{merange})
Maximum range of the motion search in pixels.
@@ -2550,6 +2557,7 @@ open GOP by setting it to @code{-cgop}. The result is similar to
the behavior of @command{x264}'s @option{--open-gop} option.
@item rc_init_occupancy (@emph{vbv-init})
+Initial VBV buffer occupancy
@item preset (@emph{preset})
Set the encoding preset.
@@ -2595,7 +2603,7 @@ Set AQ strength, reduce blocking and blurring in flat and textured areas.
Use psychovisual optimizations when set to 1. When set to 0, it has the
same effect as @command{x264}'s @option{--no-psy} option.
-@item psy-rd (@emph{psy-rd})
+@item psy-rd (@emph{psy-rd})
Set strength of psychovisual optimization, in
@var{psy-rd}:@var{psy-trellis} format.
@@ -2627,7 +2635,7 @@ to 1.
@item avcintra-class (@emph{class})
Configure the encoder to generate AVC-Intra.
-Valid values are 50,100 and 200
+Valid values are 50, 100 and 200
@item bluray-compat (@emph{bluray-compat})
Configure the encoder to be compatible with the bluray standard.
@@ -2678,8 +2686,8 @@ Set loop filter parameters, in @var{alpha}:@var{beta} form.
Set fluctuations reduction in QP (before curve compression).
@item partitions (@emph{partitions})
-Set partitions to consider as a comma-separated list of. Possible
-values in the list:
+Set partitions to consider as a comma-separated list of
+values. Possible values in the list:
@table @samp
@item p8x8
@@ -2735,19 +2743,32 @@ Variable bit rate.
Constant bit rate (not allowed in MP4 container).
@end table
-@item x264opts (N.A.)
-Set any x264 option, see @command{x264 --fullhelp} for a list.
+@item x264opts @var{opts}
+@item x264-params @var{opts}
+Override the x264 configuration using a :-separated list of key=value
+options.
-Argument is a list of @var{key}=@var{value} couples separated by
-":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
-themselves, use "," instead. They accept it as well since long ago but this
-is kept undocumented for some reason.
+The argument for both options is a list of @var{key}=@var{value}
+couples separated by ":". With @option{x264opts} the value can be
+omitted, the value @code{1} is assumed in that case.
+
+For @var{filter} and @var{psy-rd} options values that use ":" as a
+separator themselves, use "," instead. They accept it as well since
+long ago but this is kept undocumented for some reason.
+
+For example, the options might be provided as:
+@example
+level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0
+@end example
For example to specify libx264 encoding options with @command{ffmpeg}:
@example
ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
@end example
+To get the complete list of the libx264 options, invoke the command
+@command{x264 --fullhelp} or consult the libx264 documentation.
+
@item a53cc @var{boolean}
Import closed captions (which must be ATSC compatible format) into output.
Only the mpeg2 and h264 decoders provide these. Default is 1 (on).
@@ -2758,20 +2779,6 @@ Import user data unregistered SEI if available into output. Default is 0 (off).
@item mb_info @var{boolean}
Set mb_info data through AVFrameSideData, only useful when used from the
API. Default is 0 (off).
-
-@item x264-params (N.A.)
-Override the x264 configuration using a :-separated list of key=value
-parameters.
-
-This option is functionally the same as the @option{x264opts}, but is
-duplicated for compatibility with the Libav fork.
-
-For example to specify libx264 encoding options with @command{ffmpeg}:
-@example
-ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
-cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
-no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
-@end example
@end table
Encoding ffpresets for common usages are provided so they can be used with the
--
2.34.1
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description
2023-11-04 21:26 ` Stefano Sabatini
@ 2023-11-19 11:34 ` Stefano Sabatini
2023-12-03 12:06 ` Stefano Sabatini
0 siblings, 1 reply; 10+ messages in thread
From: Stefano Sabatini @ 2023-11-19 11:34 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On date Saturday 2023-11-04 22:26:27 +0100, Stefano Sabatini wrote:
> On date Wednesday 2023-09-06 11:04:49 +0530, Gyan Doshi wrote:
> [...]
>
> Sorry for the slow reply.
>
> > > -Argument is a list of @var{key}=@var{value} couples separated by
> > > -":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
> > > -themselves, use "," instead. They accept it as well since long ago but this
> > > -is kept undocumented for some reason.
> > > +@option{x264-param} is functionally the same as the @option{x264opts},
> > > +but is duplicated for compatibility with the Libav fork.
> >
> > There is a difference, in that x264opts accepts boolean args without a
> > value.
>
> Right.
>
> > > +
> > > +The argument for both options is a list of @var{key}=@var{value}
> > > +couples separated by ":". In @var{filter} and @var{psy-rd} options
> > > +that use ":" as a separator themselves, use "," instead. They accept
> > > +it as well since long ago but this is kept undocumented for some
> > > +reason.
> > > +
> > > +For example, the options might be provided as:
> > > +@example
> > > +level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0
> > > +@end example
> > > For example to specify libx264 encoding options with @command{ffmpeg}:
> > > @example
> > > ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
> > > @end example
> > > +To get the complete list of the libx264 options, invoke the command
> > > +@command{x264 --fullhelp} or consult the libx264 documentation.
> >
>
> > May want to make it clear that x264 refers to the standalone CLI tool.
>
> Isn't that clear enough? (we use the same formula in other places,
> e.g. in x265 docs).
>
> From a11eafe5a61a572f4e9ab9e4ab9907bba98300e4 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab@gmail.com>
> Date: Sat, 26 Aug 2023 01:10:09 +0200
> Subject: [PATCH] doc/encoders/libx264: review and extend option description
>
> Also, merge x264opts and x264-opts option docs to avoid duplication
> and make it clearer that they provide mostly the same functionality.
> ---
> doc/encoders.texi | 65 ++++++++++++++++++++++++++---------------------
> 1 file changed, 36 insertions(+), 29 deletions(-)
Will apply in a few days if I see no comments.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description
2023-11-19 11:34 ` Stefano Sabatini
@ 2023-12-03 12:06 ` Stefano Sabatini
0 siblings, 0 replies; 10+ messages in thread
From: Stefano Sabatini @ 2023-12-03 12:06 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On date Sunday 2023-11-19 12:34:09 +0100, Stefano Sabatini wrote:
> On date Saturday 2023-11-04 22:26:27 +0100, Stefano Sabatini wrote:
[...]
> > From a11eafe5a61a572f4e9ab9e4ab9907bba98300e4 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefasab@gmail.com>
> > Date: Sat, 26 Aug 2023 01:10:09 +0200
> > Subject: [PATCH] doc/encoders/libx264: review and extend option description
> >
> > Also, merge x264opts and x264-opts option docs to avoid duplication
> > and make it clearer that they provide mostly the same functionality.
> > ---
> > doc/encoders.texi | 65 ++++++++++++++++++++++++++---------------------
> > 1 file changed, 36 insertions(+), 29 deletions(-)
>
> Will apply in a few days if I see no comments.
Applied.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-12-03 12:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-26 1:10 [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 2/3] lavc: clarify meaning of avctx.level option Stefano Sabatini
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option Stefano Sabatini
2023-09-06 5:37 ` Gyan Doshi
2023-10-06 7:54 ` Stefano Sabatini
2023-09-05 23:11 ` [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-09-06 5:34 ` Gyan Doshi
2023-11-04 21:26 ` Stefano Sabatini
2023-11-19 11:34 ` Stefano Sabatini
2023-12-03 12:06 ` Stefano Sabatini
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git