-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrfc2326-rtsp.txt
5465 lines (3806 loc) · 213 KB
/
rfc2326-rtsp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Working Group H. Schulzrinne
Request for Comments: 2326 Columbia U.
Category: Standards Track A. Rao
Netscape
R. Lanphier
RealNetworks
April 1998
Real Time Streaming Protocol (RTSP)
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (1998). All Rights Reserved.
Abstract
The Real Time Streaming Protocol, or RTSP, is an application-level
protocol for control over the delivery of data with real-time
properties. RTSP provides an extensible framework to enable
controlled, on-demand delivery of real-time data, such as audio and
video. Sources of data can include both live data feeds and stored
clips. This protocol is intended to control multiple data delivery
sessions, provide a means for choosing delivery channels such as UDP,
multicast UDP and TCP, and provide a means for choosing delivery
mechanisms based upon RTP (RFC 1889).
Table of Contents
* 1 Introduction ................................................. 5
+ 1.1 Purpose ............................................... 5
+ 1.2 Requirements .......................................... 6
+ 1.3 Terminology ........................................... 6
+ 1.4 Protocol Properties ................................... 9
+ 1.5 Extending RTSP ........................................ 11
+ 1.6 Overall Operation ..................................... 11
+ 1.7 RTSP States ........................................... 12
+ 1.8 Relationship with Other Protocols ..................... 13
* 2 Notational Conventions ....................................... 14
* 3 Protocol Parameters .......................................... 14
+ 3.1 RTSP Version .......................................... 14
Schulzrinne, et. al. Standards Track [Page 1]
RFC 2326 Real Time Streaming Protocol April 1998
+ 3.2 RTSP URL .............................................. 14
+ 3.3 Conference Identifiers ................................ 16
+ 3.4 Session Identifiers ................................... 16
+ 3.5 SMPTE Relative Timestamps ............................. 16
+ 3.6 Normal Play Time ...................................... 17
+ 3.7 Absolute Time ......................................... 18
+ 3.8 Option Tags ........................................... 18
o 3.8.1 Registering New Option Tags with IANA .......... 18
* 4 RTSP Message ................................................. 19
+ 4.1 Message Types ......................................... 19
+ 4.2 Message Headers ....................................... 19
+ 4.3 Message Body .......................................... 19
+ 4.4 Message Length ........................................ 20
* 5 General Header Fields ........................................ 20
* 6 Request ...................................................... 20
+ 6.1 Request Line .......................................... 21
+ 6.2 Request Header Fields ................................. 21
* 7 Response ..................................................... 22
+ 7.1 Status-Line ........................................... 22
o 7.1.1 Status Code and Reason Phrase .................. 22
o 7.1.2 Response Header Fields ......................... 26
* 8 Entity ....................................................... 27
+ 8.1 Entity Header Fields .................................. 27
+ 8.2 Entity Body ........................................... 28
* 9 Connections .................................................. 28
+ 9.1 Pipelining ............................................ 28
+ 9.2 Reliability and Acknowledgements ...................... 28
* 10 Method Definitions .......................................... 29
+ 10.1 OPTIONS .............................................. 30
+ 10.2 DESCRIBE ............................................. 31
+ 10.3 ANNOUNCE ............................................. 32
+ 10.4 SETUP ................................................ 33
+ 10.5 PLAY ................................................. 34
+ 10.6 PAUSE ................................................ 36
+ 10.7 TEARDOWN ............................................. 37
+ 10.8 GET_PARAMETER ........................................ 37
+ 10.9 SET_PARAMETER ........................................ 38
+ 10.10 REDIRECT ............................................ 39
+ 10.11 RECORD .............................................. 39
+ 10.12 Embedded (Interleaved) Binary Data .................. 40
* 11 Status Code Definitions ..................................... 41
+ 11.1 Success 2xx .......................................... 41
o 11.1.1 250 Low on Storage Space ...................... 41
+ 11.2 Redirection 3xx ...................................... 41
+ 11.3 Client Error 4xx ..................................... 42
o 11.3.1 405 Method Not Allowed ........................ 42
o 11.3.2 451 Parameter Not Understood .................. 42
o 11.3.3 452 Conference Not Found ...................... 42
Schulzrinne, et. al. Standards Track [Page 2]
RFC 2326 Real Time Streaming Protocol April 1998
o 11.3.4 453 Not Enough Bandwidth ...................... 42
o 11.3.5 454 Session Not Found ......................... 42
o 11.3.6 455 Method Not Valid in This State ............ 42
o 11.3.7 456 Header Field Not Valid for Resource ....... 42
o 11.3.8 457 Invalid Range ............................. 43
o 11.3.9 458 Parameter Is Read-Only .................... 43
o 11.3.10 459 Aggregate Operation Not Allowed .......... 43
o 11.3.11 460 Only Aggregate Operation Allowed ......... 43
o 11.3.12 461 Unsupported Transport .................... 43
o 11.3.13 462 Destination Unreachable .................. 43
o 11.3.14 551 Option not supported ..................... 43
* 12 Header Field Definitions .................................... 44
+ 12.1 Accept ............................................... 46
+ 12.2 Accept-Encoding ...................................... 46
+ 12.3 Accept-Language ...................................... 46
+ 12.4 Allow ................................................ 46
+ 12.5 Authorization ........................................ 46
+ 12.6 Bandwidth ............................................ 46
+ 12.7 Blocksize ............................................ 47
+ 12.8 Cache-Control ........................................ 47
+ 12.9 Conference ........................................... 49
+ 12.10 Connection .......................................... 49
+ 12.11 Content-Base ........................................ 49
+ 12.12 Content-Encoding .................................... 49
+ 12.13 Content-Language .................................... 50
+ 12.14 Content-Length ...................................... 50
+ 12.15 Content-Location .................................... 50
+ 12.16 Content-Type ........................................ 50
+ 12.17 CSeq ................................................ 50
+ 12.18 Date ................................................ 50
+ 12.19 Expires ............................................. 50
+ 12.20 From ................................................ 51
+ 12.21 Host ................................................ 51
+ 12.22 If-Match ............................................ 51
+ 12.23 If-Modified-Since ................................... 52
+ 12.24 Last-Modified........................................ 52
+ 12.25 Location ............................................ 52
+ 12.26 Proxy-Authenticate .................................. 52
+ 12.27 Proxy-Require ....................................... 52
+ 12.28 Public .............................................. 53
+ 12.29 Range ............................................... 53
+ 12.30 Referer ............................................. 54
+ 12.31 Retry-After ......................................... 54
+ 12.32 Require ............................................. 54
+ 12.33 RTP-Info ............................................ 55
+ 12.34 Scale ............................................... 56
+ 12.35 Speed ............................................... 57
+ 12.36 Server .............................................. 57
Schulzrinne, et. al. Standards Track [Page 3]
RFC 2326 Real Time Streaming Protocol April 1998
+ 12.37 Session ............................................. 57
+ 12.38 Timestamp ........................................... 58
+ 12.39 Transport ........................................... 58
+ 12.40 Unsupported ......................................... 62
+ 12.41 User-Agent .......................................... 62
+ 12.42 Vary ................................................ 62
+ 12.43 Via ................................................. 62
+ 12.44 WWW-Authenticate .................................... 62
* 13 Caching ..................................................... 62
* 14 Examples .................................................... 63
+ 14.1 Media on Demand (Unicast) ............................ 63
+ 14.2 Streaming of a Container file ........................ 65
+ 14.3 Single Stream Container Files ........................ 67
+ 14.4 Live Media Presentation Using Multicast .............. 69
+ 14.5 Playing media into an existing session ............... 70
+ 14.6 Recording ............................................ 71
* 15 Syntax ...................................................... 72
+ 15.1 Base Syntax .......................................... 72
* 16 Security Considerations ..................................... 73
* A RTSP Protocol State Machines ................................. 76
+ A.1 Client State Machine .................................. 76
+ A.2 Server State Machine .................................. 77
* B Interaction with RTP ......................................... 79
* C Use of SDP for RTSP Session Descriptions ..................... 80
+ C.1 Definitions ........................................... 80
o C.1.1 Control URL .................................... 80
o C.1.2 Media streams .................................. 81
o C.1.3 Payload type(s) ................................ 81
o C.1.4 Format-specific parameters ..................... 81
o C.1.5 Range of presentation .......................... 82
o C.1.6 Time of availability ........................... 82
o C.1.7 Connection Information ......................... 82
o C.1.8 Entity Tag ..................................... 82
+ C.2 Aggregate Control Not Available ....................... 83
+ C.3 Aggregate Control Available ........................... 83
* D Minimal RTSP implementation .................................. 85
+ D.1 Client ................................................ 85
o D.1.1 Basic Playback ................................. 86
o D.1.2 Authentication-enabled ......................... 86
+ D.2 Server ................................................ 86
o D.2.1 Basic Playback ................................. 87
o D.2.2 Authentication-enabled ......................... 87
* E Authors' Addresses ........................................... 88
* F Acknowledgements ............................................. 89
* References ..................................................... 90
* Full Copyright Statement ....................................... 92
Schulzrinne, et. al. Standards Track [Page 4]
RFC 2326 Real Time Streaming Protocol April 1998
1 Introduction
1.1 Purpose
The Real-Time Streaming Protocol (RTSP) establishes and controls
either a single or several time-synchronized streams of continuous
media such as audio and video. It does not typically deliver the
continuous streams itself, although interleaving of the continuous
media stream with the control stream is possible (see Section 10.12).
In other words, RTSP acts as a "network remote control" for
multimedia servers.
实时流媒体协议(RTSP)创建并控制单一或者若干个基于时间同步的连续的媒体流例如音频和视频。
典型的,并不是将连续的流本身传送出来,尽管在连续的流中交错插入控制流是可行的。
换句话说,RTSP担当多媒体服务器的网络远程控制的角色。
The set of streams to be controlled is defined by a presentation
description. This memorandum does not define a format for a
presentation description.
表示性的描述定义了需要被控制的流集。这个备忘录没有定义演示描述的格式。
There is no notion of an RTSP connection; instead, a server maintains
a session labeled by an identifier. An RTSP session is in no way tied
to a transport-level connection such as a TCP connection. During an
RTSP session, an RTSP client may open and close many reliable
transport connections to the server to issue RTSP requests.
Alternatively, it may use a connectionless transport protocol such as
UDP.
没有RTSP连接的概念,代之的,一个服务器维持一个用标识符标识的会话。一个STSP会话并没有
绑定传输层连接,例如一个TCP连接。在RTSP会话期间,一个RTSP客户端能向服务器打开和关闭
许多可靠的传输连接来发送RTSP请求。另一方面,它也能用无连接的传输协议,如UDP。
The streams controlled by RTSP may use RTP [1], but the operation of
RTSP does not depend on the transport mechanism used to carry
continuous media. The protocol is intentionally similar in syntax
and operation to HTTP/1.1 [2] so that extension mechanisms to HTTP
can in most cases also be added to RTSP. However, RTSP differs in a
number of important aspects from HTTP:
RTSP控制的流可以用RTP,但RTSP的操作不依赖于传输连续媒体数据的传输机制。协议和
HTTP/1.1类似,有意的在语法和操作上简化,以便HTTP的扩展机制能在大部分情况下加入RTSP。
然而,RTSP在许多重要方面有别于HTTP:
* RTSP introduces a number of new methods and has a different
protocol identifier.
RTSP添加了若干新方法和一个不同的协议标识符。
* An RTSP server needs to maintain state by default in almost all
cases, as opposed to the stateless nature of HTTP.
RTSP服务器在几乎所有的情况下都要默认需要保存状态,区别于HTTP的无状态。
* Both an RTSP server and client can issue requests.
RTSP的服务器和客户端都可以发起请求。
* Data is carried out-of-band by a different protocol. (There is an
exception to this.)
由一个不同协议传输数据,是带外的。
* RTSP is defined to use ISO 10646 (UTF-8) rather than ISO 8859-1,
consistent with current HTML internationalization efforts [3].
RTSP使用ISO 10646(UTF-8),而不是ISO 8859-1,和现在的HTML国际化努力保持一致。
* The Request-URI always contains the absolute URI. Because of
backward compatibility with a historical blunder, HTTP/1.1 [2]
carries only the absolute path in the request and puts the host
name in a separate header field.
请求URI通常包含绝对URI。由于向后兼容历史错误,HTTP/1.1只在请求中携带了绝对路径,
而将host name放在一个单独的头字段。
This makes "virtual hosting" easier, where a single host with one
IP address hosts several document trees.
这很容易构造虚拟主机,即一个IP地址的单一主机可以管理若干文档树。
Schulzrinne, et. al. Standards Track [Page 5]
RFC 2326 Real Time Streaming Protocol April 1998
The protocol supports the following operations:
协议提供以下操作:
Retrieval of media from media server:
The client can request a presentation description via HTTP or
some other method. If the presentation is being multicast, the
presentation description contains the multicast addresses and
ports to be used for the continuous media. If the presentation
is to be sent only to the client via unicast, the client
provides the destination for security reasons.
从媒体服务器检索媒体:
客户端能够通过HTTP或者其它方法请求一个演示描述。如果多路广播了该演示,这个
演示描述将包含被用于连续媒体的多路广播的地址和端口号。如果该演示只是通过
单一传播发送给了客户端,客户端要为安全原因提供目的地。
Invitation of a media server to a conference:
A media server can be "invited" to join an existing
conference, either to play back media into the presentation or
to record all or a subset of the media in a presentation. This
mode is useful for distributed teaching applications. Several
parties in the conference may take turns "pushing the remote
control buttons."
会议邀请媒体服务器:
媒体服务器可以被邀请加入一个已有的会议,不管是在演示中回放媒体还是在演示中记录
全部或者一部分的媒体。这个模式对于分布式教学应用很有用。会议的几个部分可以轮流
控制会议。
Addition of media to an existing presentation:
Particularly for live presentations, it is useful if the
server can tell the client about additional media becoming
available.
添加媒体到现有的演示中:
特别是对于现场演示,如果服务器能告诉客户端额外的媒体已经可用了,这将很有用。
RTSP requests may be handled by proxies, tunnels and caches as in
HTTP/1.1 [2].
RTSP请求可以像HTTP/1.1一样通过代理,管道和缓存来操作。
1.2 Requirements
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [4].
1.3 Terminology
术语
Some of the terminology has been adopted from HTTP/1.1 [2]. Terms not
listed here are defined as in HTTP/1.1.
Aggregate control:
The control of the multiple streams using a single timeline by
the server. For audio/video feeds, this means that the client
may issue a single play or pause message to control both the
audio and video feeds.
集合控制:
多路的流的控制通过服务端的单一时间轴。对于音频、视频的提供,意味着客户端
可以发送一个单一播放或者暂停消息来控制音频和视频的提供。
Conference:
a multiparty, multimedia presentation, where "multi" implies
greater than or equal to one.
会议:
一个多用户、多媒体的展示,多意味着大于或等于一。
Schulzrinne, et. al. Standards Track [Page 6]
RFC 2326 Real Time Streaming Protocol April 1998
Client:
The client requests continuous media data from the media
server.
客户端:
客户端从服务端请求连续的媒体数据。
Connection:
A transport layer virtual circuit established between two
programs for the purpose of communication.
Container file:
A file which may contain multiple media streams which often
comprise a presentation when played together. RTSP servers may
offer aggregate control on these files, though the concept of
a container file is not embedded in the protocol.
容器文件:
文件能包含多个通常在一个演示中同时播放的媒体流。RTSP服务器可以针对这些
文件提供集合控制,虽然容器文件的概念没有包含在这个协议中。
Continuous media:
Data where there is a timing relationship between source and
sink; that is, the sink must reproduce the timing relationship
that existed at the source. The most common examples of
continuous media are audio and motion video. Continuous media
can be real-time (interactive), where there is a "tight"
timing relationship between source and sink, or streaming
(playback), where the relationship is less strict.
连续媒体:
在源端和接收端之间有时间关系的数据,即接收端必须复制在源端存在的时间关系。
连续媒体最常见的例子就是声音和动作视频。连续媒体能实时(交互),源和接收端
有紧密的时间关系,或者流媒体(回播),关系没有那么严格。
Entity:
The information transferred as the payload of a request or
response. An entity consists of metainformation in the form of
entity-header fields and content in the form of an entity-
body, as described in Section 8.
实体:
作为请求或答复转移的信息。一个实体由以实体头字段的形式表示的元信息和以实体
主题内容的方式表示的内容,在section 8中有描述。
Media initialization:
Datatype/codec specific initialization. This includes such
things as clockrates, color tables, etc. Any transport-
independent information which is required by a client for
playback of a media stream occurs in the media initialization
phase of stream setup.
媒体初始化:
Media parameter:
Parameter specific to a media type that may be changed before
or during stream playback.
Media server:
The server providing playback or recording services for one or
more media streams. Different media streams within a
presentation may originate from different media servers. A
media server may reside on the same or a different host as the
web server the presentation is invoked from.
Schulzrinne, et. al. Standards Track [Page 7]
RFC 2326 Real Time Streaming Protocol April 1998
Media server indirection:
Redirection of a media client to a different media server.
(Media) stream:
A single media instance, e.g., an audio stream or a video
stream as well as a single whiteboard or shared application
group. When using RTP, a stream consists of all RTP and RTCP
packets created by a source within an RTP session. This is
equivalent to the definition of a DSM-CC stream([5]).
Message:
The basic unit of RTSP communication, consisting of a
structured sequence of octets matching the syntax defined in
Section 15 and transmitted via a connection or a
connectionless protocol.
Participant:
Member of a conference. A participant may be a machine, e.g.,
a media record or playback server.
Presentation:
A set of one or more streams presented to the client as a
complete media feed, using a presentation description as
defined below. In most cases in the RTSP context, this implies
aggregate control of those streams, but does not have to.
Presentation description:
A presentation description contains information about one or
more media streams within a presentation, such as the set of
encodings, network addresses and information about the
content. Other IETF protocols such as SDP (RFC 2327 [6]) use
the term "session" for a live presentation. The presentation
description may take several different formats, including but
not limited to the session description format SDP.
演示描述:
一个演示描述在一个演示里包含关于一个或多个媒体流的信息,例如编码集,
网络地址和容量信息。其它IETF协议如SDP使用会话(session)术语代表现场演示。
演示描述可以使用几种不同的格式,包括但不限于会话描述格式SDP。
Response:
An RTSP response. If an HTTP response is meant, that is
indicated explicitly.
答复:
RTSP答复。
Request:
An RTSP request. If an HTTP request is meant, that is
indicated explicitly.
请求
RTSP session:
A complete RTSP "transaction", e.g., the viewing of a movie.
A session typically consists of a client setting up a
transport mechanism for the continuous media stream (SETUP),
starting the stream with PLAY or RECORD, and closing the
Schulzrinne, et. al. Standards Track [Page 8]
RFC 2326 Real Time Streaming Protocol April 1998
stream with TEARDOWN.
RTSP会话:
完整的RTSP交互。例如,观看电影。典型地,一个会话由下列几个步骤组成,一个
客户端尾连续媒体流设置传输机制(设置),开始播放或者记录流,和使用TEARDOWN
关闭流。
Transport initialization:
The negotiation of transport information (e.g., port numbers,
transport protocols) between the client and the server.
传输初始化:
客户端和服务端关于传输机制的协商。
1.4 Protocol Properties
协议特性
RTSP has the following properties:
RTSP有以下特性
Extendable:
New methods and parameters can be easily added to RTSP.
可扩展性:
新方法和参数可以很容易的加进RTSP中。
Easy to parse:
RTSP can be parsed by standard HTTP or MIME parsers.
容易分析:
RTSP能够被标准的HTTP或MIME分析器分析
Secure:
RTSP re-uses web security mechanisms. All HTTP authentication
mechanisms such as basic (RFC 2068 [2, Section 11.1]) and
digest authentication (RFC 2069 [8]) are directly applicable.
One may also reuse transport or network layer security
mechanisms.
安全:
RTSP重用了web安全机制。所有的HTTP权限机制如basic和数字签名(digest authentication)
都能直接应用。另外也能重用传输层或网络层的安全机制。
Transport-independent:
RTSP may use either an unreliable datagram protocol (UDP) (RFC
768 [9]), a reliable datagram protocol (RDP, RFC 1151, not
widely used [10]) or a reliable stream protocol such as TCP
(RFC 793 [11]) as it implements application-level reliability.
独立传输:
RTSP可以使用UDP,RDP(可靠的数据报协议)或如TCP这样可靠的流协议作为它执行应用层
的可靠性。
Multi-server capable:
Each media stream within a presentation can reside on a
different server. The client automatically establishes several
concurrent control sessions with the different media servers.
Media synchronization is performed at the transport level.
多服务器:
一个演示中的每一个媒体流都可以属于不同的服务器。客户端自动和不同的媒体服务器
建立若干个并发的控制会话。媒体同步在传输层执行。
Control of recording devices:
The protocol can control both recording and playback devices,
as well as devices that can alternate between the two modes
("VCR").
记录设备的控制:
协议可以控制记录和回放设备,以及可以在两种模式间切换的设备(VCR)。
Separation of stream control and conference initiation:
Stream control is divorced from inviting a media server to a
conference. The only requirement is that the conference
initiation protocol either provides or can be used to create a
unique conference identifier. In particular, SIP [12] or H.323
[13] may be used to invite a server to a conference.
分离的流控制和会议初始化:
流控制从邀请媒体服务器加入会议中分离出来。唯一的要求是会议初始化协议要么提供
,要么能创建一个唯一的会议标识符。尤其,SIP或者H.323可以用来邀请服务器加入
会议。
Schulzrinne, et. al. Standards Track [Page 9]
RFC 2326 Real Time Streaming Protocol April 1998
Suitable for professional applications:
RTSP supports frame-level accuracy through SMPTE time stamps
to allow remote digital editing.
适用于专业的应用:
RTSP通过SMPTE时间戳支持帧层面的精确得进行远程数字编辑。
Presentation description neutral:
The protocol does not impose a particular presentation
description or metafile format and can convey the type of
format to be used. However, the presentation description must
contain at least one RTSP URI.
演示描述中性:
协议没有强制使用特殊的演示描述或元文件格式,且可以转换格式类型而使用。然而,
演示描述必须包含最少一个RTSP的URI。
Proxy and firewall friendly:
The protocol should be readily handled by both application and
transport-layer (SOCKS [14]) firewalls. A firewall may need to
understand the SETUP method to open a "hole" for the UDP media
stream.
代理和防火墙友好:
HTTP-friendly:
Where sensible, RTSP reuses HTTP concepts, so that the
existing infrastructure can be reused. This infrastructure
includes PICS (Platform for Internet Content Selection
[15,16]) for associating labels with content. However, RTSP
does not just add methods to HTTP since the controlling
continuous media requires server state in most cases.
HTTP友好:
RTSP重用了HTTP的许多概念,以便现有的基础设施能够被重用。这个基础设施
包括PICS(因特网内容选择器平台)为了内容的协助标签。然而,在大部分情况下,
因为控制连续媒体需要服务器状态,RTSP无法仅仅在HTTP中加入方法。
Appropriate server control:
If a client can start a stream, it must be able to stop a
stream. Servers should not start streaming to clients in such
a way that clients cannot stop the stream.
适当的服务器控制:
Transport negotiation:
The client can negotiate the transport method prior to
actually needing to process a continuous media stream.
传输协商:
Capability negotiation:
If basic features are disabled, there must be some clean
mechanism for the client to determine which methods are not
going to be implemented. This allows clients to present the
appropriate user interface. For example, if seeking is not
allowed, the user interface must be able to disallow moving a
sliding position indicator.
性能协商:
如果有些基础特性无法使用,就必须有一些清理机制来尾客户端决定哪些方法不能执行。
允许客户端展示合适的用户界面。例如,如果寻址是不允许的,用户界面就必须使移动位置
的指示器不可用。
An earlier requirement in RTSP was multi-client capability.
However, it was determined that a better approach was to make sure
that the protocol is easily extensible to the multi-client
scenario. Stream identifiers can be used by several control
streams, so that "passing the remote" would be possible. The
protocol would not address how several clients negotiate access;
this is left to either a "social protocol" or some other floor
Schulzrinne, et. al. Standards Track [Page 10]
RFC 2326 Real Time Streaming Protocol April 1998
control mechanism.
对于RTSP的一个早先的要求是有容纳多客户能力。然而,确定一个更好的方法是确保容
易扩展到多客户方案。许多控制流使用流标识符,以便“远程传输”成为可能。协议本身
没有指定客户端沟通协商的渠道,这留给“社会协议”或者其它层面的控制机制。
1.5 Extending RTSP
扩展RTSP
Since not all media servers have the same functionality, media
servers by necessity will support different sets of requests. For
example:
因为不是所有的媒体服务器都有相同的功能,根据需求媒体服务器要支持不同的要求。
例如:
* A server may only be capable of playback thus has no need to
support the RECORD request.
服务器只需要支持回放,不要录制。
* A server may not be capable of seeking (absolute positioning) if
it is to support live events only.
如果服务器只支持现场直播,就不需要搜索功能。
* Some servers may not support setting stream parameters and thus
not support GET_PARAMETER and SET_PARAMETER.
一些服务器不支持设定流参数,因此也不支持GET_PARAMETER和SET_PARAMETER参数。
A server SHOULD implement all header fields described in Section 12.
服务器需要实现在section 12介绍的所有头字段。
It is up to the creators of presentation descriptions not to ask the
impossible of a server. This situation is similar in HTTP/1.1 [2],
where the methods described in [H19.6] are not likely to be supported
across all servers.
演示描述的创造者不要求所有服务器斗支持。正如HTTP/1.1一样,在[H19.6]中说明的方法
并非所有的服务器都支持。
RTSP can be extended in three ways, listed here in order of the
magnitude of changes supported:
RTSP能以三种方式扩展,按改变支持的程度列在这:
* Existing methods can be extended with new parameters, as long as
these parameters can be safely ignored by the recipient. (This is
equivalent to adding new parameters to an HTML tag.) If the
client needs negative acknowledgement when a method extension is
not supported, a tag corresponding to the extension may be added
in the Require: field (see Section 12.32).
现有的方法能通过新参数扩展,只要这些参数能够安全得被接收器忽略。(这正如
在HTML的tag中添加新参数一样。)如果当一个方法扩展不被支持客户端否定应答时,
带有扩展的tag可以添加到Rquire:字段中。(见12.32节)
* New methods can be added. If the recipient of the message does
not understand the request, it responds with error code 501 (Not
implemented) and the sender should not attempt to use this method
again. A client may also use the OPTIONS method to inquire about
methods supported by the server. The server SHOULD list the
methods it supports using the Public response header.
能添加新方法。如果消息接收器不能理解这个请求,它会以error code 501应答(
不执行),且发送端不应该再尝试这个方法。客户端也可以用OPTIONS方法来要求
服务端支持这个方法。服务端应该用公共回应头列出它支持的所有方法。
* A new version of the protocol can be defined, allowing almost all
aspects (except the position of the protocol version number) to
change.
可以定义新版本的协议,允许修改几乎所有的方面(除了协议版本序号的位置)。
1.6 Overall Operation
全部的操作
Each presentation and media stream may be identified by an RTSP URL.
The overall presentation and the properties of the media the
presentation is made up of are defined by a presentation description
file, the format of which is outside the scope of this specification.
The presentation description file may be obtained by the client using
Schulzrinne, et. al. Standards Track [Page 11]
RFC 2326 Real Time Streaming Protocol April 1998
HTTP or other means such as email and may not necessarily be stored
on the media server.
每一个演示和媒体流都能被RTSP的URL标识出来。所有的演示和组成演示的媒体的属性都是
通过演示描述定义的,而演示描述的格式不在这份说明书里。
For the purposes of this specification, a presentation description is
assumed to describe one or more presentations, each of which
maintains a common time axis. For simplicity of exposition and
without loss of generality, it is assumed that the presentation
description contains exactly one such presentation. A presentation
may contain several media streams.
对于这份说明书的目的,假设一份演示描述能说明一个或更多的演示,每一个都维护着一个
公共的时间轴。为了简化阐述以及不影响通用性,假定演示描述恰好只包含一个演示。一个
演示可以包含若干个媒体流。
The presentation description file contains a description of the media
streams making up the presentation, including their encodings,
language, and other parameters that enable the client to choose the
most appropriate combination of media. In this presentation
description, each media stream that is individually controllable by
RTSP is identified by an RTSP URL, which points to the media server
handling that particular media stream and names the stream stored on
that server. Several media streams can be located on different
servers; for example, audio and video streams can be split across
servers for load sharing. The description also enumerates which
transport methods the server is capable of.
演示描述文件包含组成演示的媒体流的描述,包括编码、语言和其它有助于客户端选择
最恰当的媒体组合的参数。在这份演示描述中,每一个能够通过RTSP独立控制的媒体流
都被RTSP URL标识,标识符能够指向处理特定媒体流的媒体服务器以及存在服务器
上的流的名字。一些媒体流能够在不同服务器上被定位;例如,音频和视频流可以通过
不同的服务器负载分配、描述还列举出哪些传输方法是服务器支持的。
Besides the media parameters, the network destination address and
port need to be determined. Several modes of operation can be
distinguished:
除媒体参数之外,网络目的地地址和端口号也需要确定。一些操作模式能够区别开:
Unicast:
The media is transmitted to the source of the RTSP request,
with the port number chosen by the client. Alternatively, the
media is transmitted on the same reliable stream as RTSP.
单播:
媒体通过客户端选择的端口号向RTSP的请求端传输。或者,媒体和RTSP一样
在相同的可靠流上传输。
Multicast, server chooses address:
The media server picks the multicast address and port. This is
the typical case for a live or near-media-on-demand
transmission.
多播,服务器选择地址:
媒体服务器选取多播地址和端口号。这是直播或近媒体点播传输的典型方式。
Multicast, client chooses address:
If the server is to participate in an existing multicast
conference, the multicast address, port and encryption key are
given by the conference description, established by means
outside the scope of this specification.
多播,客户端选择地址:
如果服务器加入一个现有的多播会议,多播地址,端口和加密钥匙由会议
描述给出,由这份说明书之外的方式构建。
1.7 RTSP States
RTSP状态
RTSP controls a stream which may be sent via a separate protocol,
independent of the control channel. For example, RTSP control may
occur on a TCP connection while the data flows via UDP. Thus, data
delivery continues even if no RTSP requests are received by the media
Schulzrinne, et. al. Standards Track [Page 12]
RFC 2326 Real Time Streaming Protocol April 1998
server. Also, during its lifetime, a single media stream may be
controlled by RTSP requests issued sequentially on different TCP
connections. Therefore, the server needs to maintain "session state"
to be able to correlate RTSP requests with a stream. The state
transitions are described in Section A.
RTSP控制一个可以通过一个分离协议发送的流,独立于控制频道。例如,当数据流
通过UDP传输时RTSP控制可以在一个TCP连接上出现。因此,即使媒体服务器没有
收到任何RTSP请求,数据也将继续传输。同时,在生命周期中,一个单一的媒体流
可以被RTSP请求发起的一序列在不同TCP连接中的请求控制。因此,服务器需要维护
“会话状态”从而能够关联一个流的RTSP请求。状态的转变在A节中说明。
Many methods in RTSP do not contribute to state. However, the
following play a central role in defining the allocation and usage of
stream resources on the server: SETUP, PLAY, RECORD, PAUSE, and
TEARDOWN.
在RTSP中许多方法都不能改变状态。然而,下列的方法在服务端定义配置和流资源
的使用上扮演主要的角色:SETUP,PLAY,RECORD,PAUSE,and TEARDOWN.
SETUP:
Causes the server to allocate resources for a stream and start
an RTSP session.
使服务器为流分配资源,并且开始一个RTSP会话。
PLAY and RECORD:
Starts data transmission on a stream allocated via SETUP.
在通过SETUP分配的流上开始数据传输。
PAUSE:
Temporarily halts a stream without freeing server resources.
不释放服务器资源的情况下暂停流。
TEARDOWN:
Frees resources associated with the stream. The RTSP session
ceases to exist on the server.
释放指定流的服务器资源。在服务器端终止该RTSP会话。
RTSP methods that contribute to state use the Session header
field (Section 12.37) to identify the RTSP session whose state
is being manipulated. The server generates session identifiers
in response to SETUP requests (Section 10.4).
对状态起作用的RTSP方法用会话头字段(12.37节)来标识状态被操作的
RTSP会话。服务器生成会话标识符来应答SETUP请求(10.4节)。
1.8 Relationship with Other Protocols
和其它协议的关系
RTSP has some overlap in functionality with HTTP. It also may
interact with HTTP in that the initial contact with streaming content
is often to be made through a web page. The current protocol
specification aims to allow different hand-off points between a web
server and the media server implementing RTSP. For example, the
presentation description can be retrieved using HTTP or RTSP, which
reduces roundtrips in web-browser-based scenarios, yet also allows
for standalone RTSP servers and clients which do not rely on HTTP at
all.
RTSP和HTTP在某些功能上有重叠。它也可以在流内容通过网页生成的初始化
过程中和HTTP交互。当前的协议说明书以允许在网络服务器和的媒体服务器之间
的不同转接点实现RTSP为目的。例如,能够通过HTTP或RTSP接收演示描述,这将
降低在在基于网络浏览器方案中的往返行程,但是也允许标准的RTSP服务器和客户
端完全不通过HTTP来回复。
However, RTSP differs fundamentally from HTTP in that data delivery
takes place out-of-band in a different protocol. HTTP is an
asymmetric protocol where the client issues requests and the server
responds. In RTSP, both the media client and media server can issue
requests. RTSP requests are also not stateless; they may set
parameters and continue to control a media stream long after the
Schulzrinne, et. al. Standards Track [Page 13]
RFC 2326 Real Time Streaming Protocol April 1998
request has been acknowledged.
然而,RTSP在通过不同协议的带外的数据投递上和HTTP有本质区别。当客户端
发起请求和服务端回应时,HTTP是个异步协议。在RTSP中,媒体客户和服务器
都能发起请求。RTSP请求也不是无状态的;它们可以设置参数,且可以在请求
被接受后连续长时间的控制媒体流。
Re-using HTTP functionality has advantages in at least two areas,
namely security and proxies. The requirements are very similar, so
having the ability to adopt HTTP work on caches, proxies and
authentication is valuable.
重用HTTP的功能至少在两个方面很有利,即安全性和代理。要求很相似,因此
有HTTP在cache,proxies和authentication上的工作方式的能力是值得的。
While most real-time media will use RTP as a transport protocol, RTSP
is not tied to RTP.
当大多数实时媒体将采用RTP作为传输协议时,RTSP并没有绑定在RTP上。
RTSP assumes the existence of a presentation description format that
can express both static and temporal properties of a presentation
containing several media streams.
RTSP假定演示描述格式的存在可以表达包含若干媒体流的演示的固定和临时属性。
2 Notational Conventions
标记法则
Since many of the definitions and syntax are identical to HTTP/1.1,
this specification only points to the section where they are defined
rather than copying it. For brevity, [HX.Y] is to be taken to refer
to Section X.Y of the current HTTP/1.1 specification (RFC 2068 [2]).
因为很多定义和语法通HTTP/1.1一样,这份说明书只指出两者特有的部分。简单
来说,[HX.Y]指当前HTTP/1.1说明书的X.Y节(RFC 2068 [2])。
All the mechanisms specified in this document are described in both
prose and an augmented Backus-Naur form (BNF) similar to that used in
[H2.1]. It is described in detail in RFC 2234 [17], with the
difference that this RTSP specification maintains the "1#" notation
for comma-separated lists.
在这个文档中说明的所有机制都以类似于[H2.1]的散文和参数化的
巴克斯诺尔范式(BNF)进行描述。在RFC 2234[17]中详细描述,一点区别是
RTSP说明文中保持"1#"符号来表示以逗号分割的列表。
In this memo, we use indented and smaller-type paragraphs to provide
background and motivation. This is intended to give readers who were
not involved with the formulation of the specification an
understanding of why things are the way that they are in RTSP.
在这个备忘录中,我们用缩进和较小的段落类型来表示背景知识和动机。其目的
是让与说明书的公式不相关的读者理解为什么在RTSP中它们要以这种方式说明。
3 Protocol Parameters
协议参数
3.1 RTSP Version
RTSP版本
[H3.1] applies, with HTTP replaced by RTSP.
[H3.1]应用,用RTSP代替HTTP
3.2 RTSP URL
RTSP链接
The "rtsp" and "rtspu" schemes are used to refer to network resources
via the RTSP protocol. This section defines the scheme-specific
syntax and semantics for RTSP URLs.
通过RTSP协议,"rtsp"和"rtspu"组合被用来指代网络资源。这节定义RTSP的URL
方案特定的语法和语义。
rtsp_URL = ( "rtsp:" | "rtspu:" )
"//" host [ ":" port ] [ abs_path ]
host = <A legal Internet host domain name of IP address
(in dotted decimal form), as defined by Section 2.1
Schulzrinne, et. al. Standards Track [Page 14]
RFC 2326 Real Time Streaming Protocol April 1998
of RFC 1123 \cite{rfc1123}>
port = *DIGIT
abs_path is defined in [H3.2.1].
Note that fragment and query identifiers do not have a well-defined
meaning at this time, with the interpretation left to the RTSP
server.
注意,当时片段和查询标识符没有定义明确,将解释权留给RTSP服务器。
The scheme rtsp requires that commands are issued via a reliable
protocol (within the Internet, TCP), while the scheme rtspu identifies
an unreliable protocol (within the Internet, UDP).
rtsp要求通过一种可靠协议来发送命令(在Internet就是TCP),rtspu则标明使用
一种不可靠协议(在Internet,UDP)。
If the port is empty or not given, port 554 is assumed. The semantics
are that the identified resource can be controlled by RTSP at the
server listening for TCP (scheme "rtsp") connections or UDP (scheme