开发者

how to create a RTSP streaming server

So I am trying to create a RTSP server that streams music.

I do not understand how the server plays a music and different requests get what ever is playing at that time.

so, to organize my questions:

1) how does the server play a music file?

2) how does the request to the server look like to get whats currently playing?

3) what does the response look like to get the music playing in the client that requeste开发者_JAVA百科d the music?


First: READ THIS (RTSP), and THEN READ THIS (SDP), and then READ THIS (RTP). Then you can ask more sensible questions.

  1. It doesn't, server streams little parts of the audio data to the client, telling it when each part is to be played.

  2. There is no such request. If you want, you can have URL for live streaming, and in RTSP DESCRIBE request, tell the client what is currently on.

  3. Read the first (RTSP) document, all is there! Answer to your question is this:

    RTSP/1.0 200 OK CSeq: 3 Session: 123456 Range: npt=now- RTP-Info: url=trackID=1;seq=987654

But to get the music playing you will have to do a lot more to initiate a streaming session.


You should first be clear about what is RTSP and RTP. The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in communications systems to control streaming media servers. where as Most RTSP servers use the Real-time Transport Protocol (RTP) for media stream delivery. RTP uses UDP to deliver the Packet Stream. try to Understanding these concepts.

then Have a look at this project. http://sourceforge.net/projects/unvedu/

This a open source project developed by our university, which is used to stream video(MKV) and audio file over UDP.


You can also find a .Net Implementation of RTP and RTSP here @ https://net7mma.codeplex.com/ which includes a RTSP Client and Server implementation and many other useful utilities e.g. implementations of many popular Digital Media Container Formats.

The solution has a modular design and better performance than ffmpeg or libav at the current time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜