Streaming audio from a USB camera in C#
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:
Code:
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
Re: Streaming audio from a USB camera in C#
Code:
using System;
using System.Text;
using System.Windows.Forms;
using Ozeki.Media.MediaHandlers;
using Ozeki.Media.MediaHandlers.IPCamera;
using Ozeki.Media.MediaHandlers.Video;
using Ozeki.Media.Video.Controls;
using Ozeki.Media.IPCamera;
namespace VideoCameraViewer04
{
public partial class Form1 : Form
{
private IIPCamera _camera;
private MediaConnector _connector = new MediaConnector();
private Speaker _speaker;
public Form1()
{
InitializeComponent();
_speaker = Speaker.GetDefaultDevice();
}
// Connect camera and start
private void connectBtn_Click(object sender, EventArgs e)
{
_camera = IPCameraFactory.GetCamera("192.168.115.175:8080", "admin", "admin");
_connector.Connect(_camera.AudioChannel, _speaker);
_camera.Start();
_speaker.Start();
}
}
}
some code from site's tutorial, make sure u did all the stuff it requires