Beginners Guide

Topics: Question
Mar 20, 2015 at 11:39 PM
Hi there,

Great project here. I've very new and looking for direction on the best way to implement what I want to do.

I'm planning to have 5-10 clients (to start) over the internet connect to a streaming server to playback a video playlist. The clients have a DirectShow application that I've written that has played back files on local drives fine for years. I'm planning to offer streaming capabilities, so my research has led me here.

So to start, I want to make a simple RTSP server. What do I need to do to feed the RTSP server with content to create channels to for clients to connect to?

Sorry that I'm so new to this. I'd really like a nice tutorial I can read and try out myself to get me started.

Do you know of any great links for beginners of your project?
Coordinator
Mar 21, 2015 at 12:15 AM
Hello, You can take data from files but some work is needed to achieve proper seeking support.

I am working towards this capability but don't have an automatically occurring rendition you can simply just utilize as if the current time.

If you look at the various readers you can see the logic is there and I would gladly help you achieve playback capability from any container format.

The way this capability can be achieved would require that a sdp be generated for the Tracks in the file (Including the codec specific data required for playback) using a MediaFileContainer.

GetTracks already works so the majority of the work is done.

The sdp being generated can be tricky because it requires codec information to be conveyed in a special way and that the rtp packets also follow the same convention for the codec of the Track.

There are examples on how to determine the codec and other details for the tracks in the Unit Tests for various containers.

Then that same container instance would be utilized to read the samples from the tracks.

The api is not complete but the logic is there.

If you could provide feedback and assistance testing I would be happy to start providing facilities as you need them.

I would need to know how you want to generate the sdp, what you think the api should look like.

What abstraction do you think is acceptable for Track samples? E.g. some containers have time information separate from the samples which indicates how long each samples is in time.

I do currently read most of the information I just don't store it yet as I was still deciding how I could allow for reading node by node and still allowing nodes to be parsed when required for property access.

Give it a go and let me know where you need help and I will be happy to work together to get it working for everyone's benefit.
Marked as answer by juliusfriedman on 3/20/2015 at 4:15 PM
Mar 22, 2015 at 11:33 PM
Wow, thanks for your help!

Right now all the files are MP4 container. I don't see any other reason to support anything more at this point in time, so starting with MP4/AAC support would be best.

Would multiple clients share the same streaming channel? The reason I ask is because right now each client has free reign to play whatever they want locally because the files are stored locally and played back locally. If they want to, out of the blue, play a video file on-demand, they can and the queue changes to play that video next.

Think of Netflix allowing you to jump around and play an episode here and there, there is no "constant stream" being served. Would each client then be in control of their playlist and just request to stream files one after another, similar to locally playing files but they're coming from a stream server?

Most of the files are standard definition resolution, 720x480 usually, all new files are standard 720p resolution. I'm not sure how this would work, but does the media server allow to down-grade the resolution depending on the clients internet speed, similar to how Netflix does? I've read that sometimes it's best to have multiple versions of files in different resolutions that the server can read from and server to the client based on the connection speed.

Thanks for your help.

If you'd like to discuss this more in email, IM or Skype call, I'd be happy to.
Coordinator
Mar 23, 2015 at 12:06 AM
Edited Mar 23, 2015 at 12:09 AM
No problem @ all.

I will try to answer your questions without getting too in-depth and if you need more information just let me know.

That sounds fairly easy to achieve (playback) so long as you also determine a certain codec be used for each video, this is more important than the container.

As you can see I have an API for SDP generation but it's not complete to support any codec and correctly generate the information required as I had indicated previously.

Once you determine that factor (if only a single codec is allowed) you can use any container you want as the process will be virtually the same.

GetSample will do the underlying work as required to obtain the data for the given time in the call and advance the current position of the track being played or at least that is how the API is laid out now.

This means each client can actually have several sessions, playing media from different points just like Netflix if desired or they can use a single session and play each media as required through the use of a playlist concept although that is outside the scope of the standard.

GET_PARAMETER and SET_PARAMETER would be good candidate methods for the creation and modification of such play lists as they are standard as in defined but not as in implementation thus making your Server implementation support such a concept would be considered proprietary although there is worse I have seen :)

The server does support the down-grade if the client does, you can do it both on the fly or using various files that is how you would like, either way has its benefits depending on the scenario.

E.g. you can just use in-band sps and pps changes to signal the new resolution to the end party for H.264, for other codecs there are similar ways.

I would also like to eventually get the RtspClient to a state where it can be robust enough to be used from the RtspServer but there are some changes which would need to be made to make that happen.

Are you thinking about joining the project? More than several developers have expressed interest however less than 5 have actually contributed anything worthwhile to the project. Most people end up wanting me to implement their projects for them which is completely unacceptable.

I am willing to fix bugs, evolve the API and provide more features but I need assistance to write Unit Tests, get feedback and understanding of how people would like to achieve what they want to do and how my API may or may not fit with that need.

There are also several changes which could be made to allow the Container implementations to read the information they need for property access as the Nodes are encountered rather than reading for them specifically but again that is also a feedback aspect I need to obtain and combine with the general use cases which is what this library is designed for in the end.

If you would indeed like to join or contribute then it only makes sense to get together over Skype and then again over email and probably more than once.

We should hash out what you would like to work on and how your work will benefit the project in the end, then we can Skype or email regularly to discuss progress and API changes etc which may be required.

Hopefully that makes sense, let me know if you need me to clarify anything.

I have a lot on my plate currently so the more help the better.

I know I don't plan on making Formats 'Stable' until all the remaining Unit Tests are re-written and I do some needed work on Concepts to promote the required classes to Common such as Connection and SocketConfiguration.

In short the more feedback and the more contributions the better.

Let me know your intentions and how you would like to proceed.
Marked as answer by juliusfriedman on 3/22/2015 at 4:07 PM
Mar 23, 2015 at 11:03 PM
Totally understandable.

I'm glad there is a potential of getting what I need done and I'm more than willing to contribute where and when I can. My plate is full too but this is something that I would love to work towards.

I'd love to discuss more. I will PM you my email address and info and we can go from there.
Coordinator
Mar 24, 2015 at 12:42 AM
Sounds great, my email address is also in the license.

Take care and hope to hear from you soon!