I have two file, video.mp4 and audiotrack.mp3. I am using the following command to insert the audio with the video to create an audio track in the video, and it's working.
ffmpeg -y -i video.mp4 -i audiotrack.mp3 -af apad -map 0:v -map 1:a -c:v copy -shortest finalwithAudio.mp4
The problem: The audio works fine but ends aburptly when the video reaches its end. I want it to start fading out 1 or 2 seconds before the video end. is it possible?