Skip to content

Stream audio from USB camera in C#

Leon Dunn

Asked Feb 20, 2015, 3:05 AM EST2 answers
Share
LinkedInX
Hi all,

I have a Microsoft USB webcam and I want to record the video/audio stream. I found a very useful C# web camera software but I don't get any audio from the camera's microphone. Here is the code I am trying to employ:

connector.Connect(_camera, _mpeg4Recorder.AudioRecorder); //This does not work
_connector.Connect(_camera, _mpeg4Recorder.VideoRecorder);

Can you help me with this issue I am pretty clueless here

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I used leadtools sdk in my project to implement multimedia features so I might be able to steer you in the correct direction. On the same machine that have webcam connected, can you capture audio and video? You can try using the software that came with the camera or you can use AMCap which is a standard test tool from microsoft. If you can capture both audio and video, check the internal graph of the capture operation in your application.
    0
  • 0
    Hey,
    Thanks for the answer! In the meanwhile I could solve this. I made a mistake in the code. The point is that I tried to connect the camera to the mpeg4Recorder.AudioRecorder, but the microphone should be connected to it.

    connector.Connect(_microphone,_mpeg4Recorder.AudioRecorder); //This is the good code, now it works:)
    0