[FFmpeg-devel] [PATCH] doc: document aresample:first_pts

Stefano Sabatini stefasab at gmail.com
Mon Jan 21 19:40:38 CET 2013


On date Monday 2013-01-21 16:47:34 +0100, Michael Niedermayer encoded:
> Documentation copied from asyncts, the options are supposed to do
> the same thing. If not please submit a testcase where they differ
> so we can fix it.
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  doc/ffmpeg-resampler.texi |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/doc/ffmpeg-resampler.texi b/doc/ffmpeg-resampler.texi
> index d45126f..cd3c02e 100644
> --- a/doc/ffmpeg-resampler.texi
> +++ b/doc/ffmpeg-resampler.texi
> @@ -168,6 +168,14 @@ may be stretched or squeezed for each second.
>  Default value is 0, thus no compensation is applied to make the samples match
>  the audio timestamps.
>  
> + at item first_pts
> +For swr only, Assume the first pts should be this value.

Assume -> assume

And this documentation doesn't really explain what the option really
does ("it assumes something" is not a very useful explanation about
what the option *does*), and doesn't tell what the option argument is
(a pts? in which time unit?) and what the default is.

A possibly better explanation:

For swr only, assume the first pts should be this value and pad/trim
the input accordingly.

If the value of the first audio frame is less than this value, it pads
the stream with silence; if it is greater, it trims the audio samples
until the sample corresponding to the specified PTS.

> The time base is 1 / sample rate.

The time base of what? Also is the argument a PTS or a time
specification?

> +This allows for padding/trimming at the start of stream. By default, no
> +assumption is made about the first frame's expected pts, so no padding or
> +trimming is done. For example, this could be set to 0 to pad the beginning with
> +silence if an audio stream starts after the video stream or to trim any samples
> +with a negative pts due to encoder delay.

[...]
-- 
FFmpeg = Funny Fanciful Mournful Pacific Elegant Gnome


More information about the ffmpeg-devel mailing list