[FFmpeg-user] Help: transform 'asyncts=first_pts=0' into new 'aresample' filter

Stefano Sabatini stefasab at gmail.com
Sun Jan 20 23:38:14 CET 2013


On date Sunday 2013-01-20 22:36:35 +0100, Frank Häfemeier wrote:
> Hi,
> the latest ffmpeg version does not support the filter 'asyncts'. It is
> deprecated and it is recommended to use 'aresample' instead.
> 
> Who know how to transform the filter 'asyncts=first_pts=0' into the new
> one? Is it possible? I am not familiar enough and searching an
> experienced user.

What I used when I need the same functionality:
min_comp=0.001:min_hard_comp=0.1

Exegesis:
delta = |input PTS - expected PTS|

min_comp=d

basically enables soft/hard compensation in case delta >= d.

Compensation consists in applying one of these:
stretching/squeezing (soft compensation)
filling or trimming (hard compensation)

Since you want to enable *filling*/padding in this case,
min_hard_comp=0.1 will add samples if delta >= 0.1 (this happens in
case of big delay at the beginning of the file), soft compensation in
case of "small" (<0.1 seconds) gaps. Since min_hard_comp=0.1 is the
default, you can simply set equivalently:
aresample=min_comp=0.001

See the ffmpeg-resampler(1) manual for more info.

There is no way to exactly duplicate the asyncts functionality -
padding *only* at the file beginning. asyncts can be enabled with
--enable-libavresample when building.

See also asetpts, ashowinfo, aselect filters.


More information about the ffmpeg-user mailing list