which protocol should i use for streaming audio (not live)? [closed]

  • Last Update :
  • Techknowledgy :

The SHOUTcast client protocol is effectively the same as HTTP/1.0. The only relevant difference is the response status line:

ICY 200 OK

Suggestion : 2

"Real Time Streaming Protocol Information and Updates". Archived from the original on 2007-03-06., a central information repository about RTSP.,The transmission of streaming data itself is not a task of RTSP. Most RTSP servers use the Real-time Transport Protocol (RTP) in conjunction with Real-time Control Protocol (RTCP) for media stream delivery. However, some vendors implement proprietary transport protocols. The RTSP server software from RealNetworks, for example, also used RealNetworks' proprietary Real Data Transport (RDT). ,^ Rao, Anup; Lanphier, Rob. "Real Time Streaming Protocol (RTSP)". tools.ietf.org. Retrieved 2021-02-23. ,Helix Universal Server: RealNetworks commercial streaming server for RTSP, RTMP, iOS, Silverlight and HTTP streaming media clients

An OPTIONS request returns the request types the server will accept.
C - > S: OPTIONS rtsp: //example.com/media.mp4 RTSP/1.0
   CSeq: 1
Require: implicit - play
Proxy - Require: gzipped - messages

S - > C: RTSP / 1.0 200 OK
CSeq: 1
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
A DESCRIBE request includes an RTSP URL (rtsp://...), and the type of reply data that can be handled. This reply includes the presentation description, typically in Session Description Protocol (SDP) format. Among other things, the presentation description lists the media streams controlled with the aggregate URL. In the typical case, there is one media stream each for audio and video stream. The media stream URLs are either obtained directly from the SDP control fields or they are obtained by appending the SDP control field to the aggregate URL.
C - > S: DESCRIBE rtsp: //example.com/media.mp4 RTSP/1.0
   CSeq: 2

S - > C: RTSP / 1.0 200 OK
CSeq: 2
Content - Base: rtsp: //example.com/media.mp4
   Content - Type: application / sdp
Content - Length: 460

m = video 0 RTP / AVP 96
a = control: streamid = 0
a = range: npt = 0 - 7.741000
a = length: npt = 7.741000
a = rtpmap: 96 MP4V - ES / 5544
a = mimetype: string;
"video/MP4V-ES"
a = AvgBitRate: integer;
304018
a = StreamName: string;
"hinted video track"
m = audio 0 RTP / AVP 97
a = control: streamid = 1
a = range: npt = 0 - 7.712000
a = length: npt = 7.712000
a = rtpmap: 97 mpeg4 - generic / 32000 / 2
a = mimetype: string;
"audio/mpeg4-generic"
a = AvgBitRate: integer;
65790
a = StreamName: string;
"hinted audio track"
A SETUP request specifies how a single media stream must be transported. This must be done before a PLAY request is sent. The request contains the media stream URL and a transport specifier. This specifier typically includes a local port for receiving RTP data (audio or video), and another for RTCP data (meta information). The server reply usually confirms the chosen parameters, and fills in the missing parts, such as the server's chosen ports. Each media stream must be configured using SETUP before an aggregate play request may be sent.
C - > S: SETUP rtsp: //example.com/media.mp4/streamid=0 RTSP/1.0
   CSeq: 3
Transport: RTP / AVP;
unicast;
client_port = 8000 - 8001

S - > C: RTSP / 1.0 200 OK
CSeq: 3
Transport: RTP / AVP;
unicast;
client_port = 8000 - 8001;
server_port = 9000 - 9001;
ssrc = 1234 ABCD
Session: 12345678

C - > S: SETUP rtsp: //example.com/media.mp4/streamid=1 RTSP/1.0
   CSeq: 3
Transport: RTP / AVP;
unicast;
client_port = 8002 - 8003
Session: 12345678

S - > C: RTSP / 1.0 200 OK
CSeq: 3
Transport: RTP / AVP;
unicast;
client_port = 8002 - 8003;
server_port = 9002 - 9003;
ssrc = 1234 ABCD
Session: 12345678
A PAUSE request temporarily halts one or all media streams, so it can later be resumed with a PLAY request. The request contains an aggregate or media stream URL. A range parameter on a PAUSE request specifies when to pause. When the range parameter is omitted, the pause occurs immediately and indefinitely.
C - > S: PAUSE rtsp: //example.com/media.mp4 RTSP/1.0
   CSeq: 5
Session: 12345678

S - > C: RTSP / 1.0 200 OK
CSeq: 5
Session: 12345678
This method initiates recording a range of media data according to the presentation description. The time stamp reflects start and end time(UTC). If no time range is given, use the start or end time provided in the presentation description. If the session has already started, commence recording immediately. The server decides whether to store the recorded data under the request URI or another URI. If the server does not use the request URI, the response should be 201 and contain an entity which describes the states of the request and refers to the new resource, and a Location header.
C - > S: RECORD rtsp: //example.com/media.mp4 RTSP/1.0
   CSeq: 6
Session: 12345678

S - > C: RTSP / 1.0 200 OK
CSeq: 6
Session: 12345678

Suggestion : 3

Last modified: Jul 8, 2022, by MDN contributors

<video src="rtsp://myhost.com/mymedia.format">
   <!-- Fallback here -->
</video>