开发者

Audio track in video file - C++

开发者 https://www.devze.com 2022-12-15 04:57 出处:网络
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.

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开发者_StackOverflow中文版 to copy the audio track from one video file to another? Maybe FFmpeg?

My application is written in Visual C++.


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.

0

精彩评论

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