[FFmpeg-devel] [PATCH] doc/ffmpeg: update and extend documentation for -copytb

Rodney Baker rodney.baker at iinet.net.au
Sat Mar 24 16:34:48 CET 2012


On Sun, 25 Mar 2012 01:52:28 Stefano Sabatini wrote:
> Address trac ticket #1120.
> ---
>  doc/ffmpeg.texi |   19 +++++++++++++++++--
>  ffmpeg.c        |    2 +-
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
> index 402a4ae..b5a1fd0 100644
> --- a/doc/ffmpeg.texi
> +++ b/doc/ffmpeg.texi
> @@ -765,8 +765,23 @@ the parameter is the maximum samples per second by
> which the audio is changed. without any later correction.
>  @item -copyts
>  Copy timestamps from input to output.
> - at item -copytb
> -Copy input stream time base from input to output when stream copying.
> + at item -copytb @var{mode}
> +Specify how to set the timebase when stream copying. @var{mode} is an
> +integer numeric value.
> +
> +If positive, the output time base is copied unchanged from the
> +corresponding input stream. A positive value is sometimes required for
> +avoiding non monotonically increasing timestamps when copying video
> +streams with variable frame rate.
> +
> +If zero, changes the time base as required in case the output supports
> +variable frame rate.
> +
> +If negative, changes the time base as with @code{-copytb 0} but only
> +when it seems required for generating sane output files.
> +
> +Default value is -1.
> +

So, what are the legal values? -1,0,1? Does specifying a positive integer >1 
cause any different behaviour than 1? If not, why not specify "if 1" rather 
than "if positive" to avoid ambiguity?

As a user who is not a developer or an expert, one thing I find very valuable 
in documentation is a clear articulation of what are acceptable values or 
ranges of values when required for specific parameters and just what they 
mean. 

Just my $0.02 worth. 

>  @item -shortest
>  Finish encoding when the shortest input stream ends.
>  @item -dts_delta_threshold
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 8f9735b..ac038fd 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -5057,7 +5057,7 @@ static const OptionDef options[] = {
>      { "async", HAS_ARG | OPT_INT | OPT_EXPERT,
> {(void*)&audio_sync_method}, "audio sync method", "" }, {
> "adrift_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT,
> {(void*)&audio_drift_threshold}, "audio drift threshold", "threshold" }, {
> "copyts", OPT_BOOL | OPT_EXPERT, {(void*)&copy_ts}, "copy timestamps" }, -
>    { "copytb", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&copy_tb}, "copy
> input stream time base when stream copying", "source" }, +    { "copytb",
> HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&copy_tb}, "copy input stream time
> base when stream copying", "mode" }, { "shortest", OPT_BOOL | OPT_EXPERT,
> {(void*)&opt_shortest}, "finish encoding within shortest input" }, // {
> "dts_delta_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT,
> {(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold",
> "threshold" }, { "dts_error_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT,
> {(void*)&dts_error_threshold}, "timestamp error delta threshold",
> "threshold" },

-- 
==========================================================================
Rodney Baker VK5ZTV
rodney.baker at iinet.net.au
==========================================================================


More information about the ffmpeg-devel mailing list