Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create a RTSP streaming server

Tags:

rtsp

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 requested the music?

like image 793
King Arthur Avatar asked Dec 01 '10 05:12

King Arthur


1 Answers

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.

like image 172
Cipi Avatar answered Oct 09 '22 23:10

Cipi