Streaming video files with RtspServer

Topics: Question
May 11, 2015 at 5:52 AM
How can i stream a mp4 file with your library?
What media must added to RtspServer for streaming video files?
Anyone can bring an code example for me.
May 19, 2015 at 10:46 PM
The same way you would stream any other file types.


Sure if you post up a picture.
Marked as answer by juliusfriedman on 5/19/2015 at 3:46 PM
Jun 18, 2015 at 2:59 PM
Hi Julius,

I have a similiar question to your code. I have a .mp4 file at my desktop and want to stream it to another computer.
The following code was modified out of your example:

var source = new Media.Rtsp.Server.MediaTypes.RtspSource("test", new Uri (@"C:\Users\Examplename\Desktop\Pets.mp4")); All the time i get "could not resolve host" error.
Do i first need to get a stream of my file done that afterwards i can pass to this line of code?

Thanks in advance for your answer.

Kind regards,

Jun 19, 2015 at 7:35 PM
And what is your question?

I don't know how you would accomplish anything let alone the streaming of the data required to playback the file. With that being typed I would imagine you would need to packetize the video data according to a certain standard and then everything should work as it does for everyone else who can read and adhere to such standards.

Let me know when you have some type of tangle question so that I can answer it succinctly,
Marked as answer by juliusfriedman on 6/19/2015 at 12:35 PM
Jun 22, 2015 at 8:13 AM
I started C# some months ago, so i m no pro (yet) ;). I have problems with the "Media" namespace.

Your example is:
Media.Rtsp.Server.Media.RtspSource source = new Media.Rtsp.Server.Media.RtspSource("RtspSourceTest", "rtsp://");


I figured out the following renaming:

(second) Media = Mediatypes
AddMedia = TryAddMedia

now my codelines are:

Media.Rtsp.Server.MediaTypes.JPEGMedia source = new Media.Rtsp.Server.MediaTypes.JPEGMedia("RtspSourceTest", @"C:\Users\MyName\Desktop\test.jpg"); server.TryAddMedia(source); but i allways get an "Error 77 The type or namespace name 'Media' could not be found (are you missing a using directive or an assembly reference?)"
wether i m doing a "using Media;" or not.
But for all i cant find an example of how to implement this namespace. All the code examples never include the using directives to gain some knowledge about it.

So the question is: How to implement the "Media" namespace not to get the Error 77 anymore??
(I m on VS 2012)

Jun 22, 2015 at 11:34 PM
So sorry that you can't figure something out. I don't see how or why this would require my attention. Good day.