Audio merge modify video length

Viewed 22

I'm trying to merge an audio soundtrackPath to a video videoPath, so I wrote this script:

ffmpeg -i $videoPath -i '$soundtrackPath' -c:v copy \
-filter_complex \"[0:a]aformat=fltp:44100:stereo,apad[0a];[1]aformat=fltp:44100:stereo,volume=1.5[1a];[0a][1a]amerge[a]\" \
-map 0:v -map \"[a]\" -ac 2 $outputPath 2>log.txt

which is working but there are two issues that I don't know how to fix:

  1. Merge audio is too low, is possible decrease the volume of soundtrackPath?
  2. Video lenght is 1:59 and the soundtrackPath is 3:29, the final result will modify the video length to 3:29, is possible to adapt the audio only for the video length?
0 Answers
Related