[Ffmpeg-devel] Re: FFMPEG: How to encore audio and mix (merge) audio and video file

Michel Bardiaux mbardiaux
Mon Oct 23 11:16:11 CEST 2006


Paul wrote:
> I need source code sample.. . Please help me if you can
> Thanks again
>   ----- Original Message ----- 
>   From: Paul 
>   To: ffmpeg-devel at mplayerhq.hu 
>   Sent: Saturday, October 21, 2006 4:29 PM
>   Subject: FFMPEG: How to encore audio and mix (merge) audio and video file
> 
> 
> 
>   Hi all member,
>   i am using FFMPEG library (thank for free)
>   I have used this lib to record video file (MPEG1 codec). The video file call video.mpg
> 
>   I can use directsound to get sound data buffer.
>   Now i want to use FFMPEG to encore the sound buffer, and then i can get encoded audio file (MPEG1 or any codec).
>   Can you show me how to do this? Assume i call the encoded audio file is audio.mp3 

Look in output_example.c.

Note that if you want mp3 audio, you will need to install lame, and 
configure ffmpeg to use it.

> 
>   And final, i would like to mix (merge) audio.mp3 and video.mpg, how can i do this????

ffmpeg -i video.mpg -i output.mp3 -acodec copy -vcodec copy final.mpg

> 
>   These are urgent for me and many thank for your help. 

Cheers,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list