Reputation: 17
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 .
Upvotes: 0
Views: 1668
Reputation: 1122
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
Upvotes: 1