I am trying to run the my ffmpeg command to merge an audio file with a video that has sound. The command I am using lowers down the volume on the audio file, since it is music and the video has audio.
Im having a problem with the audio file being cut off when the video's sound ends, instead of continuing until the video finishes.
/usr/local/bin/ffmpeg \
-i thepath/input.mp4 \
-i musicpath/music.mp3 \
-filter_complex \
"[1:a]volume=-21dB,apad[A]; \
[0:a][A]amerge[out]" \
-c:v libx264 -c:a aac -map 0:v -map "[out]" \
-preset ultrafast -threads 0 -profile:v baseline \
-ac 2 -pix_fmt yuv420p -t 30 -y thepath/output.mp4 2>&1
Im confused as to why it doesnt work as intended?