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:
- Merge audio is too low, is possible decrease the volume of
soundtrackPath? - Video lenght is
1:59and thesoundtrackPathis3:29, the final result will modify the video length to3:29, is possible to adapt the audio only for the video length?