I have a read/seek input stream of a video file (.avi mpeg4\xVid\ect..) in C# and I would like to stream it to a video player with jump to moment X feature enabled. How can I implement this?
I heard that RTP might be a good protocol.
What I'm really looking for is a library in C# that will help me out.
Thanks in advance.
Yes, Streamcoders solution is very good if you have some €1890. But if you do not want to pay money you should look at some free libraries or write your own from scratch.
Take a look at these articles with C# sources:
RTP VOIP Library Project
How to use the managed RTP classes in .NET
And another good articles at CodeProject:
How to Build a .NET Softphone in C# with SIP, SDP, RTP and RTCP
How to use the managed RTP API classes in .NET to create your multicasting systems
Please do not forget to share your WPF library when you will implement it.
I have used http://www.streamcoders.com/products/rtpnet.html.
There is a much more flexible solution depending on the problem..
https://net7mma.codeplex.com/
It is what amounts to a fully complaint RFC2326 stack which therefor also supports RFC3550 and various other technologies which enable you to provide a RtspServer and if desired a HttpServer (which can be either in process or out of process with respect to the RtspServer)
There are also implementations of SIP and various other Internet and VoIP technologies such as an RFC2435 Encoder / Decoder; all of which are written using completely managed code.
There is support for various other RTP profiles such as JPEG, H.264 etc as well as completely managed implementations of image codecs which are under way.
To advocate for StreamCoders I would like to say that I have looked at their library a few years ago, and I will say it's is great if you don't have any of the following restrictions
:
- You don't run on Mono, and you don't run on Linux.
- You don't want to read and write to the same container file at the same time
- You only need MMX or SSE level optomizations
For what would have amounted to approximately $3,000 for a one year support contract with the lifetime ability to distribute the application based on their SDK I honestly didn't find it appealing at all as anyone can do the same with ffmpeg, gstreamer a myriad of open source application or the intel, amd or nvidia drivers on supported hardware.
If you don't have the expertise to use ffmpeg or another decoder and you can compensate for that by monetary means then by any means necessary it's probably some type of solution for you.