Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stream video to an RTMP based Media Server (Red5) using C#

I am writing an C#.Net based application which requires publishing video and audio streams to Red 5 Media Server and retrieving the same published stream in another application on a local network and later on on internet.

In short, I intend to use Red5 as intermediate or proxy for the transmission of video and audio data between two clients.

[client 1] <-Video and Audio -> <- Video and Audio -> [Client 2]

I am looking for .NET implementation(library) of the RTMP protocol that can help me publish the stream to Media Server and retirve the published stream and play it back on my application.

I searched over SOF and came to these options:

  • Borrocoli RTMP Client Library
  • FlourineFx.NET
  • WebORb.Net

Each has some limitations.

  1. Borrocoli RTMP Library has only plyback support for audio/video streams but there is no option of publishing a video/audio stream to the media server. I have played with the library and seen its examples but no avail. If i am wrong please correct me.

  2. FlourinFx.Net says that supports NetStream.Publish(), NetStream.AttachAudio() and NetStream.AttachVideo() methods. But in latest snapshot of code, there is nothing like this. Same is true for their production release. The NetStream class doesn't have the stated methods and/or does not have any methods that can help publish streaming content TO the media server.

  3. WebOrb.Net: I have not explored it, but as evident from their licensing page, the free version works with IIS only. The enterprise version seems to have all the support for publishing streaming video...

Questions:

  1. Is it possible that I can use WebOrb.Net library in conjunction with Red5 Media Server?
  2. Will the free version allow me to publish audio and video to Red5 media server?
  3. Is there any other free alternative I can use if the above questions are not valid?
like image 209
Steve Johnson Avatar asked Apr 09 '12 15:04

Steve Johnson


People also ask

What is the difference between RTMP and Rtmps?

RTMP vs. RTMPS. RTMPS is RTMP with an added layer of security for protected streaming.


1 Answers

You can use ffmpeg to send stream to Red 5 MediaServer.. Set the source video to ffmpeg and the output to rtmp of red5, something like this:

ffmpeg -re -i file.mp4 -c copy -f flv rtmp://server/live/streamName

See this answer for an examples to integrate ffmpeg in c#.

like image 156
tmac12 Avatar answered Sep 27 '22 20:09

tmac12