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

3

14

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?
Exercitation answered 9/4, 2012 at 15:6 Comment(4)
No, :\. As i said, none of the available libraries provide "server" or "streaming to server" capability as far as i know with th eexception of Webordb.Net. FlourineFX latest SVN has some code that looks like can do the job...but it would need a lot of refactoring perhaps to get it done, it doent have any thing out of the box to get done. And playing with AMF0 to get it done seems a lot of work.. If you come across any api that is free and provides "Stream to server from client app" function, please do let me know. ThanksExercitation
I once looked through all of those. Broccoli and Fluorine were on my list of potential things. Nothing ended up seeming very useful. I ended up changing my tech and avoiding this path altogether. I know that's not the world's be advice, but this is a long hard path you're on.Sophiesophism
Do you need the streamed video to be available for streaming to client 2 before streaming it to the server completely?Chemistry
yes. actually i need it in a peer to peer Video function. However, if streaming server such as RED5 or FMS is required, i can utilize that too!Exercitation
P
2

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#.

Paolo answered 5/11, 2014 at 13:7 Comment(1)
This answer is not detailed enough. Please update it to include the relevant information.Czerny
P
0

you can use weborb.lib for peer to peer video streaming by using flex and .net via RTMP protocol.you can use for the peer to peer streaming.your process can be done by as follows... 1.develop a Flex client code connecting to the server and subscribing to receive server-side updates with the CPU readings. The code also includes a chart to visualize the received data. 2.The server-side 'Application handler' which plugs into WebORB, polls CPU and delivers data to the client.It will works try it.

Placebo answered 28/5, 2014 at 10:47 Comment(0)
U
0

Use RTMPdump's librtmp. It's written in C but you should be able to write C# wrappers for it easily enough.

Unlike answered 6/12, 2014 at 18:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.