开发者

combining separate audio and video files into one file C++

开发者 https://www.devze.com 2023-03-20 22:28 出处:网络
I am working on a C++ project with openCV. It is a simple web cam application with basic features like capturing pictures and videos. I have already been able to save video (w/o audio). Since openCV d

I am working on a C++ project with openCV. It is a simple web cam application with basic features like capturing pictures and videos. I have already been able to save video (w/o audio). Since openCV doesnot support audio processi开发者_如何学Pythonng, I was wondering if there is any way I can record audio separately in a different file and later combine those together to get one video file. While searching on the internet, I did hear something about using ffmpeg with openCV. But I just cant figure out how to do it exactly.....

Can you guys help me? I would be very grateful... Thankyou!

P.S. I have used openCV and QT (for GUI)


As you said, opencv doesn't by itself deal with audio. However once you get a separate audio and video file, you can combine them using a technique called muxing. There are many many ways to do this. I use VirtualDub for most of my muxing needs, although it is windows only (not sure if that's a problem). I know ffmpeg is also capable of muxing (via the command line interface), I can't recall what the command is. There's also mplayer and a multitude of other programs out there to do this.


as far as i know openCV is good for video/image processing. To support audio processing, you can use other libraries e.g. PortAudio or C-sound.

0

精彩评论

暂无评论...
验证码 换一张
取 消