how to create a RTSP streaming server

后端 未结 3 1698
挽巷
挽巷 2021-01-30 18:21

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.

相关标签:
3条回答
  • 2021-01-30 18:54

    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.

    0 讨论(0)
  • 2021-01-30 19:04

    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.

    0 讨论(0)
  • 2021-01-30 19:08

    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 讨论(0)
提交回复
热议问题