0

I am trying to record a video in OpenCV from a stream such as a webcam with audio. I am currently writing the application to use DirectShow to grab data from the stream and to pass that data into an IplImage*. This is great for creating the video file, but what if I would like to include audio? Do I have to use another library to write out the small amount of audio information?

Any help is greatly appreciated.

Seb
  • 3,414
  • 10
  • 73
  • 106

1 Answers1

0

No, it is not a purpose of OpenCV library.

Andrey Kamaev
  • 29,582
  • 6
  • 94
  • 88
  • So I would have to use DirectShow to get my video data and push that into OpenCV and then use DirectShow to save out audio separately. Afterwards I would need another application to merge the 2 together? – Seb Oct 03 '11 at 21:03
  • @Seb Yes, to record both streams (audio and video) you can capture them with DirectShow then process video frame with OpenCV and finally save processed video & audio streams with DirectShow (or FFMPEG). You can merge them in the same application or as separate post-processing step as you suggested. – Andrey Kamaev Oct 03 '11 at 21:17
  • Thanks for the information. I'll figure out the best method from here – Seb Oct 04 '11 at 19:22