<分区>
我的 C++ 应用程序使用 openframeworks 以 .mov 格式从网络摄像头录制视频,并使用第 3 方应用程序将应用程序声音录制到单独的 .wav 文件。 在执行结束时,我需要将视频和音频文件合并为一个。是否有任何库或 API 可以执行此操作?
希望得到一些帮助,谢谢!
<分区>
我的 C++ 应用程序使用 openframeworks 以 .mov 格式从网络摄像头录制视频,并使用第 3 方应用程序将应用程序声音录制到单独的 .wav 文件。 在执行结束时,我需要将视频和音频文件合并为一个。是否有任何库或 API 可以执行此操作?
希望得到一些帮助,谢谢!
最佳答案
类似于问题here , 以下内容引自那里:
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.
编辑:ffmpeg
的两种使用方式:
使用 C/C++
API:查看以下很棒的 ffmpeg 教程
使用系统调用: 查看here有关如何合并音频和视频文件的脚本源代码(命令)。
关于c++ - 将音频和视频文件合并为一个 [C++],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20885843/