[FFmpeg-user] Differing behaviours by fade and afade filters

Paul B Mahol onemda at gmail.com
Sun May 7 17:58:41 EEST 2017

On 5/7/17, Gyan <gyandoshi at gmail.com> wrote:
> The video fade filter has a start_frame option which starts the fade effect
> when the ordinal count of the processed frame reaches the start_frame value
> e.g.
> ffmpeg -f lavfi -i testsrc2=d=5 -vf trim=2,fade=s=25:d=1
> vfade-works-by-frame-count.mp4
> In the command above, the video output fades in starting at pts_time 3.00
> whereas the command,
> ffmpeg -f lavfi -i testsrc2=d=5 -vf trim=2,fade=st=1:d=1
> vfade-fails-by-timestamp.mp4
> fails because 'st' references timestamps and trim does not reset them.
> With the afade filter, the command
> ffmpeg -f lavfi -i sine=d=5 -af atrim=2,afade=ss=44100:d=1
> afade-fails-by-sample-count.mp4
> fails. Audio remains at native volume throughout.
> But the command
> ffmpeg -f lavfi -i sine=d=5 -af atrim=2,afade=ss=88200:d=1
> afade-works-if-sample-count-is-pts.mp4
> works. Audio fades in from pts_time 2.00 to 3.00. Which indicates that 'ss'
> refers to the original sample PTS rather than the ordinal count of
> processed audio samples.
> Is this intended? If yes, can one emulate the behaviour of the video fade
> filter. If no, should I file a bug report?

Yes it is intended,  If you want alternative fill feature request on out trac.

Alternative you can reset pts with asetpts=.. filter.

More information about the ffmpeg-user mailing list