[FFmpeg-user] trim and pad audio without reencode

Alexander Machev mukarator at gmail.com
Wed Apr 8 14:38:23 EEST 2020


I want to align the audio stream in the input to has the exact same
duration as the video stream. So, if audio length is lower than video, fill
the gap with silence. If audio stream is over length than video, cut the
audio to fit the video length.

It seems apad and atrim filters can do the job, but they will force
reencoding of the whole audio stream.

Is it possible to achieve this without reencoding everything ?


More information about the ffmpeg-user mailing list