Pergunta

I want to stream live video and audio over ip on c#. The audio and video come from a webcam and Will be sent in rtp protocol. My idea is to capture the audio with naudio encode it with g711 and send it on port X, Capture images with rate of 20/25 fps from the webcam, do some encoding(dont know which kind yet..) and send it on port Y. My question is: is this way is the right one for streaming live video and audio? Is there is a way to combine both video and audio to the same packet and send it on the same port?

Foi útil?

Solução

Your problem doesn't sound that complicated,and is easily doable. You have separate audio, and video streams, and you want to combine them and stream it, right ?

Simplest way will be to use either windows media encoder or adobe media encoder. Windows media encoder do have the additional capability of streaming the video straight, without a streaming server involved. You can select your webcam as 'source video' and select any microphone as 'audio source', and windows media encoder will combine both of them, and create a stream for you, which can be watched live by anyone, or could be pushed to a streaming media server for relay broadcasting.

Link to wme http://www.microsoft.com/en-in/download/details.aspx?id=17792

Outras dicas

This is a clear case of "Built or Buy". I wouldn't built something like this. It's full of technical pitfalls and very (very) questionable if a single developer, as intelligent as he might be, should even try to implement that from scratch. It's far better to find an open-source solution that does the dirty work for you. Your question will then be secondary and solved by configuring the package accordingly.

What comes to my mind is this: how to embed vlc media player into my c# windows form app?

At least look at this route, it might be a much quicker way to accomplishing your final objective.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top