将单独的音频和视频文件组合成一个文件C ++ [英] combining separate audio and video files into one file C++
问题描述
在互联网上搜索时,我听到有关使用带有openCV的ffmpeg的内容。但我只是不明白如何做到这一点.....
你们能帮我吗?我会非常感谢...谢谢!
P.S。我使用openCV和QT(GUI)
正如你所说,opencv本身并不处理音频。但是,一旦您收到一个单独的音频和视频文件,您可以使用多路复用技术组合它们。有很多方法可以做到这一点。我使用的是 VirtualDub ,尽管它只是windows(不知道是否有问题)我知道ffmpeg也可以复用(通过命令行界面),我不记得命令是什么。还有mplayer和许多其他程序可以做到这一点。
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 processing, 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.
这篇关于将单独的音频和视频文件组合成一个文件C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!