c++ - 将音频和视频文件合并为一个 [C++]

标签 c++ audio video merge

<分区>

我的 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的两种使用方式:

  1. 使用 C/C++ API:查看以下很棒的 ffmpeg 教程

  2. 使用系统调用: 查看here有关如何合并音频和视频文件的脚本源代码(命令)。

关于c++ - 将音频和视频文件合并为一个 [C++],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20885843/

相关文章:

c++ - 发送到 : An invalid argument was supplied

c++ - Emacs 24 前奏。 .emacs 冲突?

c++ - 为什么我们不能从 void* 隐式分配给 C++ 中的任何其他类型,但它在 C 中更受欢迎?

linux - ffmpeg 改变输出的顺序

c++ - 如何减少 x264 流式传输时的延迟

c++ - 在 QTableView/QSortFilterProxy 中恢复原始顺序

android - 从麦克风到扬声器的现场 “retranslation”(类似扩音器)

javascript - 如何通过一个按钮或链接切换音频播放()暂停()?

c++ - 如何将 64 位 void 指针转换为 32 位 void 指针?

javascript - 减慢用户下载/保存 html5 视频的速度