如何在C#中流式传输音频 [英] How to stream audio in C#

查看:165
本文介绍了如何在C#中流式传输音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个Microsoft USB网络摄像头,我想录制视频/音频流。我发现了一个非常有用的 C#网络摄像头软件,但我没有从摄像头的麦克风那里得到任何音频。以下是我尝试使用的代码:



 connector.Connect(_camera,_mpeg4Recorder.AudioRecorder);  //  这不起作用 
_connector.Connect(_camera,_mpeg4Recorder.VideoRecorder);





你能帮我解决这个问题我在这里很无能为力。

解决方案

< blockquote>尝试下面提到的链接..这些可能会有所帮助...



CodeProject - 通过网络发送和播放麦克风音频 [ ^ ]



CodeMiles - 通过网络发送和播放麦克风音频 [ ^ ]


感谢您的回答,与此同时我可以自己弄明白。我在代码中犯了一个错误。



connector.Connect(_microphone,_mpeg4Recorder.AudioRecorder);



这是正确的,首先我尝试将相机连接到_mpeg4Recorder.AudioRecorder而不是麦克风。我的坏,但谢谢!


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.

解决方案

Try below mentioned links.. these might be helpfull...

CodeProject - Sending and playing microphone audio over network[^]

CodeMiles - Sending and playing microphone audio over network[^]


Thanks for the answers, in the meantime I could figure it out myself. I made a mistak in the code.

connector.Connect(_microphone,_mpeg4Recorder.AudioRecorder);

This is the right one, first i tried to connect the camera to the _mpeg4Recorder.AudioRecorder instead of the microphone. My bad, but thank you!


这篇关于如何在C#中流式传输音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆