0

I have following code in ProcessFrame event:

frame = new Mat();
capture.Retrieve(frame, 0);
if (isRecord && _writer.Ptr != IntPtr.Zero)

{_writer.Write(frame);}

Output video doesn't have sound.

I want to record both video and sound .

mickmackusa
  • 43,625
  • 12
  • 83
  • 136
Luan Nguyen
  • 17
  • 1
  • 6

1 Answers1

1

The short answer is you cannot. There are no provisions within EmguCV/OpenCV that provide for manipulation or even capture of an audio track. EmguCV/OpenCV are SDKs for Computer Vision applications are not really intended to to do general purpose manipulation of video/audio streams.

In general I have found it is better to avoid EmguCV/OpenCV for video capture and use these tools strictly for computer vision applications. I can recommend MFormats by Medialooks asa very good SDK for capture and manipulation of Video and Audio streams.

Disclaimer, I do not work for Medialooks nor do I have any financial stake in the company. Just a satisfied customer.

Doug

AeroClassics
  • 1,074
  • 9
  • 19