[Ffmpeg-devel] Merge video and audio

Aaron Williams aaronw
Mon Oct 30 04:23:47 CET 2006


Paul wrote:
> HI all,
>
> I have a video file , format is mpeg (codec is MPEG1). 
> i also have an audio file , format is wav (codec is PCM).
>
> anyone can show me codes sample (C++ or VC) how to merge them together to get the output file (video and audio).
>
> Thanks for any help.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>   
You might try looking at mplex in the mjpeg tools.  This tool is
designed exactly for the purpose you require and hence the code might be
easier to understand.  This is in no way a putdown of ffmpeg, since
mplex is like a screwdriver whereas ffmpeg is like a Swiss Army knife
and entire toolbox combined.  Though I might add that I had much better
luck combining files with mplex than ffmpeg since ffmpeg had a lot of
problems maintaining A-V synchronization.  I then had to run the output
file through FFMPEG using the copy codecs to make the output VOB DVD
compliant (and in this case the A-V sync was maintained).




More information about the ffmpeg-devel mailing list