<p>Use</p>

<pre><code>ffmpeg -y -i intro-17may.mp4 -i video.mp4 -i outro.mp4 -i energy-song.mp3 -i vcs-watermark-video.png -filter_complex "[0:v]drawtext=fontfile=FutuMd.ttf: text='Hello World': x=300: y=450: fontsize=40: fontcolor=white: enable='between(t,2,5)',fade=t=out:st=5:d=1,setpts=PTS-STARTPTS[v0]; \
[1:v][4]overlay=W-w-5:H-h-5,fade=t=in:st=0:d=1,fade=t=out:st=63:d=1,setpts=PTS-STARTPTS[v1]; \
[2:v]fade=t=in:st=0:d=1,setpts=PTS-STARTPTS[v2]; \
[3:a]volume=enable='between(t,34,36)':volume=-8dB,volume=enable='between(t,36,42)':volume=-10dB,volume=enable='between(t,47,51)':volume=-8dB,volume=enable='between(t,51,58)':volume=-10dB,adelay=6000|6000[3a]; \
[v0][0][v1][1:a][v2][2]concat=n=3:v=1:a=1[outv][outa];[outa][3a]amix=inputs=2:duration=shortest[outa]" -vcodec libx264 -c:a aac -ac 2 -map "[outv]" -map "[outa]" c4.mp4
</code></pre>

<p>The BG music is delayed by 6000 ms (duration of intro) and then mixed with the audio after concat.</p>

CC BY-SA 4.0
2018-06-25T08:25:45.320Z
i tried but audio is not added in outro why?
Jinal Somaiya
CC BY-SA 4.0
2018-06-25T08:27:38.250Z
How long is the BG music?
Gyan
CC BY-SA 4.0
2018-06-25T08:30:25.650Z
Audio music is 1:04 long and outro video has audio of 6 seconds long.
Jinal Somaiya
CC BY-SA 4.0
2018-06-25T08:43:42.823Z
Your BG music isn't long enough. Your main video is at least 1:04 long according to the fade filters applied.
Gyan
CC BY-SA 4.0
2018-06-25T08:18:36.783Z
2018-06-25T08:18:36.783Z
Gyan
<p>here i have one command that is working properly but i want to add audio to second and third video not only second video.So, how to proceed?</p>

<pre><code>fmpeg -y -i intro-17may.mp4 -i video.mp4 -i outro.mp4 -i energy-song.mp3 -i vcs-watermark-video.png -filter_complex "[0:v]drawtext=fontfile=FutuMd.ttf: text='Hello World': x=300: y=450: fontsize=40: fontcolor=white: enable='between(t,2,5)',fade=t=out:st=5:d=1,setpts=PTS-STARTPTS[v0]; \
[1:v][4]overlay=W-w-5:H-h-5,fade=t=in:st=0:d=1,fade=t=out:st=63:d=1,setpts=PTS-STARTPTS[v1]; \
[2:v]fade=t=in:st=0:d=1,setpts=PTS-STARTPTS[v2]; \
[3:a]volume=enable='between(t,34,36)':volume=-8dB,volume=enable='between(t,36,42)':volume=-10dB,volume=enable='between(t,47,51)':volume=-8dB,volume=enable='between(t,51,58)':volume=-10dB[3a];[1:a][3a]amix=inputs=2:duration=shortest[maina]; \
[v0][0][v1][maina][v2][2]concat=n=3:v=1:a=1[outv][outa]" -vcodec libx264 -c:a aac -ac 2 -map "[outv]" -map "[outa]" c4.mp4
</code></pre>

<video><ffmpeg>
add Audio to two Video in below command
Jinal Somaiya
# add Audio to two Video in below command

(Asked by: username_0 on 2018-06-25)

here i have one command that is working properly but i want to add audio to second and third video not only second video.So, how to proceed?
fmpeg -y -i intro-17may.mp4 -i video.mp4 -i outro.mp4 -i energy-song.mp3 -i vcs-watermark-video.png -filter_complex "[0:v]drawtext=fontfile=FutuMd.ttf: text='Hello World': x=300: y=450: fontsize=40: fontcolor=white: enable='between(t,2,5)',fade=t=out:st=5:d=1,setpts=PTS-STARTPTS[v0]; \
[1:v][4]overlay=W-w-5:H-h-5,fade=t=in:st=0:d=1,fade=t=out:st=63:d=1,setpts=PTS-STARTPTS[v1]; \
[2:v]fade=t=in:st=0:d=1,setpts=PTS-STARTPTS[v2]; \
[3:a]volume=enable='between(t,34,36)':volume=-8dB,volume=enable='between(t,36,42)':volume=-10dB,volume=enable='between(t,47,51)':volume=-8dB,volume=enable='between(t,51,58)':volume=-10dB[3a];[1:a][3a]amix=inputs=2:duration=shortest[maina]; \
[v0][0][v1][maina][v2][2]concat=n=3:v=1:a=1[outv][outa]" -vcodec libx264 -c:a aac -ac 2 -map "[outv]" -map "[outa]" c4.mp4

**Tags:** video, ffmpeg


---

## 1 answers

### Answer by username_1 on 2018-06-25. Score: 1

Use
ffmpeg -y -i intro-17may.mp4 -i video.mp4 -i outro.mp4 -i energy-song.mp3 -i vcs-watermark-video.png -filter_complex "[0:v]drawtext=fontfile=FutuMd.ttf: text='Hello World': x=300: y=450: fontsize=40: fontcolor=white: enable='between(t,2,5)',fade=t=out:st=5:d=1,setpts=PTS-STARTPTS[v0]; \
[1:v][4]overlay=W-w-5:H-h-5,fade=t=in:st=0:d=1,fade=t=out:st=63:d=1,setpts=PTS-STARTPTS[v1]; \
[2:v]fade=t=in:st=0:d=1,setpts=PTS-STARTPTS[v2]; \
[3:a]volume=enable='between(t,34,36)':volume=-8dB,volume=enable='between(t,36,42)':volume=-10dB,volume=enable='between(t,47,51)':volume=-8dB,volume=enable='between(t,51,58)':volume=-10dB,adelay=6000|6000[3a]; \
[v0][0][v1][1:a][v2][2]concat=n=3:v=1:a=1[outv][outa];[outa][3a]amix=inputs=2:duration=shortest[outa]" -vcodec libx264 -c:a aac -ac 2 -map "[outv]" -map "[outa]" c4.mp4

The BG music is delayed by 6000 ms (duration of intro) and then mixed with the audio after concat.

> **Comments:**
> **username_0**: i tried but audio is not added in outro why?  
> **username_1**: How long is the BG music?  
> **username_0**: Audio music is 1:04 long and outro video has audio of 6 seconds long.  
> **username_1**: Your BG music isn't long enough. Your main video is at least 1:04 long according to the fade filters applied.  

---

