PDA

View Full Version : Audio Overlay over Video


Priyatam
29th March 2007, 14:26
Hiya Guyz


Is it possible to overlay audio[preferably a WAV file] on a Video File [MOV,MP4,WMV] using ffmpeg.

I have a requirement where in I have to mix audio over video at a pre-determined insertion point.

Any help will be appreciated.

Thanks in Advance.

Bye
Priyatam

setarip_old
29th March 2007, 19:44
Hi!

In general terms, add silence to the beginning of the audio, up to the point in time that the audio should first be heard in the video (e.g. If the audio is supposed to start at 5 minutes into the video, add 5 minutes of silence to the beginning of the audio).

Then multiplex.

Priyatam
30th March 2007, 08:47
Hi!,

I want to preserve the audio of actual video. If i add silence to to the beginning of audio, then the audio of output video file will be in silence when i mix it. or else is there any other way that i could completely replace the audio of video file with new audio using ffmpeg. Can you please give a example how to do that.

Thanks in advance

Bye

Priyatam

setarip_old
30th March 2007, 19:10
So now you're saying that what you want to do is add a SECOND audiostream to your video file that already contains one audiostream?

If so, for the SECOND audiostream, as I said in my first post, add silence to the beginning of the second audiostream, up to the point in time that the audio should first be heard in the video (e.g. If the audio is supposed to start at 5 minutes into the video, add 5 minutes of silence to the beginning of the audio) - then use the same software you used to create your original video to add the second audiostream...

Priyatam
2nd April 2007, 11:09
Hi,

you got me wrong again. Lemme explain...I have a video file of length 30 sec's. In the middle say 15th sec i have a 2 sec's audio gap where in i need to insert a new audio of length 2 sec's, so that output will have the 2 sec's audio file mixed in the right position. I want to do this using ffmpeg. Can you please help me

Priyatam
4th April 2007, 13:45
So now you're saying that what you want to do is add a SECOND audiostream to your video file that already contains one audiostream?

If so, for the SECOND audiostream, as I said in my first post, add silence to the beginning of the second audiostream, up to the point in time that the audio should first be heard in the video (e.g. If the audio is supposed to start at 5 minutes into the video, add 5 minutes of silence to the beginning of the audio) - then use the same software you used to create your original video to add the second audiostream...
Is there anyway to add silence to existing audio file. For ex i have a 2 sec wav file and i want to add 25sec silence to the beginning of 2 sec audio file, so that in total it becomes 27sec file Thanks in advance :)

setarip_old
4th April 2007, 20:12
Of course there is! Why else would I have suggested (twice) that you do it?

Use virtually any audio editor (such as GoldWave, Audacity, etc.)...

Priyatam
5th April 2007, 09:47
Thank you. I was able to add silence using Audacity. But i want a tool that takes command lines. Is it not possible to add silence using ffmpeg ? If not can you please suggest me any other command line utilities to add silence. Thanks in advance :)

setarip_old
5th April 2007, 10:01
Thank you. I was able to add silence using Audacity.You're quite welcome ;>}

Priyatam
5th April 2007, 10:03
But still my question was not answered :(

Priyatam
5th April 2007, 14:17
You're quite welcome ;>}
Please gimme a solution:D

tebasuna51
5th April 2007, 14:43
ffmpeg is a great tool but can't do anything. You need:

1) Demux/decode from audio/video container the audio wav track. Maybe you can use ffmpeg for that.

2) Split the wav in two fragments at point desired. You can use BeSplit for that.

3) Merge the first fragment + the silence + the second fragment to the desired new audio wav track. You can use BeSweet with .lst file for that.

4) You need encode/mux the new audio track with video. I don't know if you can use ffmpeg for all containers in your first post (MOV,MP4,WMV).

Priyatam
8th April 2007, 16:29
Hi,

Thanks.

But is it possible to concatenate two video files using ffmpeg with the audio mixed on top of it.