views:

142

answers:

1

My application is transforming an AVI video file into another AVI file. I use the OpenCV library. Unfortunately videos created with OpenCV have no sound as the library does not support audio.

Is there any easy way to copy the audio track from one video file to another? Maybe FFmpeg?

My application is written in Visual C++.

+2  A: 

You can use FFmpeg. The easiest way would be to just use the command line tool to extract/reassemble. If you need your application to do it itself, looking into the sources for how they do it should help.

Alternatively, as you mention VC++, why not use DirectShow? It should not be too difficult to sink the audio into a file for extraction and later sink the video/audio mix into a file for composition.

Georg Fritzsche
Thanks Peter,Can you give some further hints how to do this with DirectShow?
rybz