I want to use FFMPEG to merege multiple audios and one video.
Materials are:
Requirement is:
The requirement is depicted like below.
<--short-clip-1.3gp time duration--> <--short-clip-2.3gp time duration-->
<-------------------------------------- 1.mp3 ----------------------------------------------------->
<-------------------------------------- 1.mp4 ----------------------------------------------------->
The command I use is as below, but it does not work as expected.
ffmpeg -i 1.mp4 -i 1.3gp -itsoffset 00:00:10 -i 2.3gp -i 1.mp3 -map 0:v -map 1:a -map 2:a -map 3:a -c:v copy -c:a copy result.mp4
Any hint is appreciated!
Thanks to Mulvya's solution. Here are extra info for how to mix multiple audio stream with delay requirement:
ffmpeg -i 1.mp3 -i 1.3gp -i 2.3gp -i 3.3gp -i 4.3gp -i 5.3gp -i 1.mp4 \
-filter_complex "[2]adelay=2790|2790[s2];\
[3]adelay=10300|10300[s3];\
[4]adelay=14930|14930[s4];\
[5]adelay=21090[s5];\
[0][1][s2][s3][s4][s5]amix=6[mixout]" \
-map 6:v -map [mixout] -c:v copy result.mp4
The difficult part is: [2]adelay=2790|2790[s2]
. it means 'select 3rd input, give 2,79sec delay and ouput as s2', the 's2' is used in following 'amix' command to generate a '6[mixout]' which is used then in '-map'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With