Have to Add 3 or more audio to a video file

For the developers that use FFmpeg in their software.
Post Reply
Photon
Posts: 2
Joined: Wed Oct 26, 2016 3:54 am

Have to Add 3 or more audio to a video file

Post by Photon » Wed Oct 26, 2016 3:56 am

Using ffmpeg, I stripped the audio off the video. Now I created a video length silence audio file. I dubbed the Audio at various locations and have multiple audio files say audio1.wav, audio2.wav....audion.wav, whose start and end positions are known

Now I need to add these audio files to the main video file, or the silence file (which is full length), and finally add it to the video file Can some one help me with the right command? (Windows OS)

Code: Select all


**Audio Stripped**
C:\ffmpeg\bin\ffmpeg.exe -i inVideo.mp4 -vcodec copy -an outVideo.mp4

**Silence file**
    C:\ffmpeg\bin\ffmpeg.exe -f lavfi -i aevalsrc=0:0::duration=300 -ab 320k silence.mp3

**Concatenate Audio files:** 
<help required>
Any help in this regard is appreciated

llogan
Posts: 332
Joined: Fri Mar 14, 2014 3:29 am

Re: Have to Add 3 or more audio to a video file

Post by llogan » Wed Oct 26, 2016 6:32 pm

You can generate and add silent audio in one command:

Code: Select all

ffmpeg -i input.mp4 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -map 0:v -map 1:a -c:v copy -shortest output.mp4
I dubbed the Audio at various locations and have multiple audio files say audio1.wav, audio2.wav....audion.wav, whose start and end positions are known
So you want to place each of these in specific locations within the silent audio?

Photon
Posts: 2
Joined: Wed Oct 26, 2016 3:54 am

Re: Have to Add 3 or more audio to a video file

Post by Photon » Thu Oct 27, 2016 3:09 am

Thats right... overlay dubbed audios at specific locations in silent Audio, So that I can finally merge Video and Audios

Post Reply
'