forked from onvif/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Media2.xml
executable file
·2642 lines (2640 loc) · 134 KB
/
Media2.xml
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
<?xml version="1.0"?>
<?xml-stylesheet href="docbook.xsl" type="text/xsl" ?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0">
<info>
<title>Media2 Service Specification</title>
<titleabbrev>Media2</titleabbrev>
<releaseinfo>24.06</releaseinfo>
<author>
<orgname>ONVIF™</orgname>
<uri>www.onvif.org</uri>
</author>
<pubdate>June 2024</pubdate>
<mediaobject>
<imageobject>
<imagedata fileref="media/logo.png" contentwidth="60mm"/>
</imageobject>
</mediaobject>
<copyright>
<year>2008-2024</year>
<holder>ONVIF™ All rights reserved.</holder>
</copyright>
<legalnotice>
<para>Recipients of this document may copy, distribute, publish, or display this document so
long as this copyright notice, license and disclaimer are retained with all copies of the
document. No license is granted to modify this document.</para>
<para>THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR
AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE;
OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.</para>
<para>IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR
RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT, WHETHER OR NOT (1) THE CORPORATION,
MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2)
SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR
DISTRIBUTION OF THIS DOCUMENT. THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT
APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR
RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF
THE CORPORATION.</para>
</legalnotice>
<revhistory>
<revision>
<revnumber>1.0</revnumber>
<date>Dec-2015</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>First release</revremark>
</revision>
<revision>
<revnumber>1.01</revnumber>
<date>Mar-2016</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>CR 1767, 1819</revremark>
</revision>
<revision>
<revnumber>16.06</revnumber>
<date>Jun-2016</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>CR 1786, 1795, 1799, 1801, 1819, 1861, 1869</revremark>
</revision>
<revision>
<revnumber>16.12</revnumber>
<date>Dec-2016</date>
<author>
<personname>Sujith Raman</personname>
</author>
<author>
<personname>Steve Dillingham</personname>
</author>
<author>
<personname>Hans Busch</personname>
</author>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Added RTSP over WebSocket Added Scene Orientation Modes Added Privacy Mask CR
1873, 1875, 1931, 1951, 1983, 1986</revremark>
</revision>
<revision>
<revnumber>17.06</revnumber>
<date>Jun-2017</date>
<author>
<personname>Hans Busch</personname>
</author>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Update method layouts. Change Request 1843, 2018, 2037, 2064, 2082,
2105</revremark>
</revision>
<revision>
<revnumber>17.12</revnumber>
<date>Dec-2017</date>
<author>
<personname>Sujith Raman</personname>
</author>
<author>
<personname>Steve Wolf</personname>
</author>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Added ViewMode Added OSD Image Upload Change Request 2152, 2159, 2176, 2187,
2197, 2203, 2207</revremark>
</revision>
<revision>
<revnumber>18.06</revnumber>
<date>Jun-2018</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Change Request 2216, 2217, 2282</revremark>
</revision>
<revision>
<revnumber>18.12</revnumber>
<date>Dec-2018</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Change Request 2295</revremark>
</revision>
<revision>
<revnumber>19.06</revnumber>
<date>Jun-2019</date>
<author>
<personname>Steve Wolf</personname>
</author>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Added Active Sessions Change Request 2479, 2512</revremark>
</revision>
<revision>
<revnumber>19.12</revnumber>
<date>Dec-2019</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<author>
<personname>Dora Han</personname>
</author>
<revremark>Change Request 2489, 2557, 2573, 2603, 2636 Added Multitrack
Streaming</revremark>
</revision>
<revision>
<revnumber>20.06</revnumber>
<date>Jun-2020</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 2571, 2604</revremark>
</revision>
<revision>
<revnumber>20.12</revnumber>
<date>Dec-2020</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>Support media service without video encoder.</revremark>
</revision>
<revision>
<revnumber>21.06</revnumber>
<date>Jun-2021</date>
<author>
<personname>Sujith Raman</personname>
</author>
<revremark>Clarify system coordinates.</revremark>
</revision>
<revision>
<revnumber>21.12</revnumber>
<date>Dec-2021</date>
<author>
<personname>Hans Busch, Rick Boer</personname>
</author>
<revremark>Add optional Receiver configuration to Media2. Fix inconsistency in Media2 NoProfile fault message.</revremark>
</revision>
<revision>
<revnumber>22.12</revnumber>
<date>Dec-2022</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>Add secure RTSPS streaming.</revremark>
</revision>
<revision>
<revnumber>23.06</revnumber>
<date>Jun-2023</date>
<author>
<personname>Oksana Tuishkina</personname>
</author>
<revremark>Clarify signaling rotation in video source configuration.</revremark>
</revision>
<revision>
<revnumber>24.06</revnumber>
<date>Jun-2024</date>
<author>
<personname>Fredrik Svensson</personname>
</author>
<revremark>Add WebRTC configuration.</revremark>
</revision>
</revhistory>
</info>
<chapter xml:id="_Toc241999828">
<title>Scope </title>
<para>This document defines the second generation web service interface for configuration of the so called media profiles. These include the selection of Video and Audio inputs as well as PTZ and Analytics modes and the configuration of Video and Audio encoders.</para>
<para>Media streaming is out of scope of this document and covered by the ONVIF streaming specification.</para>
<para>Web service usage is outside of the scope of this document. Please refer to the ONVIF core specification.</para>
</chapter>
<chapter>
<title>Normative references</title>
<para>IANA Media Type Reference</para>
<para role="reference">< <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.iana.org/assignments/media-types/media-types.xhtml"></link>></para>
<para>ONVIF Core Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/core/ONVIF-Core-Specification.pdf"></link>></para>
<para>ONVIF PTZ Service Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/srv/ptz/ONVIF-PTZ-Service-Spec.pdf"></link>></para>
<para>ONVIF Streaming Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/stream/ONVIF-Streaming-Spec.pdf"></link>></para>
<para>ONVIF WebRTC Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/stream/ONVIF-WebRTC-Spec.pdf"></link>></para>
<para>ONVIF Security Service Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/stream/ONVIF-Security-Service-Spec.pdf"></link>></para>
</chapter>
<chapter>
<title>Terms and Definitions</title>
<section>
<title>Definitions</title>
<informaltable>
<tgroup cols="2">
<colspec colname="c1" colwidth="24*" />
<colspec colname="c2" colwidth="76*" />
<tbody valign="top">
<row>
<entry align="left">
<para>
<emphasis role="bold">Configuration Entity</emphasis>
</para>
</entry>
<entry align="left">
<para>A network video device media abstract component that produces or consumes a media stream on the network, i.e. video and/or audio stream. </para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Digital PTZ</emphasis>
</para>
</entry>
<entry align="left">
<para>Function that diminishes or crops an image to adjust the image position and ratio.</para>
</entry>
</row>
<row>
<entry valign="middle">
<para>
<emphasis role="bold">GZIP</emphasis>
</para>
</entry>
<entry valign="middle">
<para>GNU data format for lossless compression.</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Media Profile</emphasis>
</para>
</entry>
<entry align="left">
<para>Maps a video and audio sources and outputs encoders as well as PTZ and analytics configurations.</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Metadata</emphasis>
</para>
</entry>
<entry align="left">
<para>All streaming data except video and audio, including video analytics results, PTZ position data and other <phrase>metadata (such as textual data from POS applications)</phrase>.</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Reference Token</emphasis>
</para>
</entry>
<entry align="left">
<para>Token provided by the device to uniquely reference an instance of a physical IO, configuration or profile.</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Video Analytics</emphasis>
</para>
</entry>
<entry align="left">
<para>Algorithms or programs used to analyze video data and to generate data describing object location and behaviour.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section>
<title>Abbreviations</title>
<informaltable>
<tgroup cols="2">
<colspec colname="c1" colwidth="24*" />
<colspec colname="c2" colwidth="76*" />
<tbody valign="top">
<row>
<entry valign="middle">
<para>RTCP</para>
</entry>
<entry valign="middle">
<para>RTP Control Protocol</para>
</entry>
</row>
<row>
<entry valign="middle">
<para>RTP</para>
</entry>
<entry valign="middle">
<para>Realtime Transport Protocol</para>
</entry>
</row>
<row>
<entry valign="middle">
<para>RTSP</para>
</entry>
<entry valign="middle">
<para>Real Time Streaming Protocol</para>
</entry>
</row>
<row>
<entry valign="middle">
<para>TCP</para>
</entry>
<entry valign="middle">
<para>Transmission Control Protocol</para>
</entry>
</row>
<row>
<entry valign="middle">
<para>UDP</para>
</entry>
<entry valign="middle">
<para>User Datagram Protocol</para>
</entry>
</row>
<row>
<entry valign="middle">
<para>EXI</para>
</entry>
<entry valign="middle">
<para>Efficient XML Interchange Format</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</chapter>
<chapter>
<title>Overview</title>
<para>Media configurations are handled through the media service. Media configurations are used to determine the streaming properties of requested media streams as defined in this specification. The device provides media configuration through the media service. WSDL for this service is specified in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/media/wsdl/media.wsdl">http://www.onvif.org/ver20/media/wsdl/media.wsdl</link>l.</para>
<table>
<title>Referenced namespaces (with prefix)</title>
<tgroup cols="2">
<colspec colname="c1" colwidth="13*" />
<colspec colname="c2" colwidth="87*" />
<thead>
<row>
<entry>
<para>Prefix</para>
</entry>
<entry>
<para>Namespace URI</para>
</entry>
</row>
</thead>
<tbody valign="top">
<row>
<entry>
<para>env</para>
</entry>
<entry>
<para>http://www.w3.org/2003/05/soap-envelope</para>
</entry>
</row>
<row>
<entry>
<para>ter</para>
</entry>
<entry>
<para>http://www.onvif.org/ver10/error</para>
</entry>
</row>
<row>
<entry>
<para>xs </para>
</entry>
<entry>
<para>http://www.w3.org/2001/XMLSchema </para>
</entry>
</row>
<row>
<entry>
<para>tt</para>
</entry>
<entry>
<para>http://www.onvif.org/ver10/schema</para>
</entry>
</row>
<row>
<entry>
<para>tr2</para>
</entry>
<entry>
<para>http://www.onvif.org/ver20/media/wsdl</para>
</entry>
</row>
<row>
<entry>
<para>tns1</para>
</entry>
<entry>
<para>http://www.onvif.org/ver10/topics</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
<section>
<title>Media profiles</title>
<para>Real-time video and audio streaming configurations are controlled using media profiles. A media profile maps a video and/or audio source to a video and/or an audio encoder, PTZ and analytics configurations. An ONVIF compliant device supporting the media service presents different available profiles depending on its capabilities (the set of available profiles might change dynamically though). </para>
<figure>
<title>A media profile</title>
<mediaobject>
<imageobject>
<imagedata fileref="media/Media2/image2.jpeg" contentwidth="92.54mm" />
</imageobject>
</mediaobject>
</figure>
<para>A device may provide “ready to use” profiles for the most common media configurations that the device offers. The Profile contains a “fixed” attribute that indicates if a profile can be deleted or not. The fixed attribute does not signal that a profile is immutable. Hence it shall be possible to add or remove configurations to or from a fixed profile. Whether a profile is fixed or not is defined by the device. </para>
<para>A profile consists of a set of interconnected <emphasis>configuration entities. </emphasis>Configurations are provided by the device and can be either static or created dynamically by the device. For example, the dynamic configurations can be created by the device depending on current available encoding resources. A configuration entity is one of the following:</para>
<itemizedlist>
<listitem>
<para>Video source configuration</para>
</listitem>
<listitem>
<para>Audio source configuration</para>
</listitem>
<listitem>
<para>Video encoder configuration</para>
</listitem>
<listitem>
<para>Audio encoder configuration</para>
</listitem>
<listitem>
<para>PTZ configuration</para>
</listitem>
<listitem>
<para>Video analytics configuration</para>
</listitem>
<listitem>
<para>Metadata configuration</para>
</listitem>
<listitem>
<para>Audio output configuration</para>
</listitem>
<listitem>
<para>Audio decoder configuration</para>
</listitem>
</itemizedlist>
<para>A profile consists of all or a subset of these configuration entities. Depending on the capabilities of the device, a particular configuration entity can be part of a profile or not. For example, a profile with an audio source and an audio encoder configuration can exist only in a device with audio support. </para>
<para>An example of a complete profile configuration is illustrated in <xref linkend="_Ref210451597" />.</para>
<figure xml:id="_Ref210451597">
<title>Figure 2: Complete profile configuration </title>
<mediaobject>
<imageobject>
<imagedata fileref="media/Media2/mediaProfile.svg" contentwidth="140mm" />
</imageobject>
</mediaobject>
</figure>
<para>A media profile describes how and what to present to the client in a media stream as well as how to handle PTZ input and Analytics. </para>
<para>The following commands manage Media Profiles:</para>
<itemizedlist>
<listitem>
<para>
<emphasis>CreateProfile </emphasis>– Creates a new media profile.</para>
</listitem>
<listitem>
<para>
<emphasis>GetProfiles</emphasis> – Get one or all existing media profiles.</para>
</listitem>
<listitem>
<para>
<emphasis>DeleteProfile</emphasis> – Deletes a specific media profile.</para>
</listitem>
<listitem>
<para>
<emphasis>AddConfiguration </emphasis>– Adds or replaces configuration entities of a media profile.</para>
</listitem>
<listitem>
<para>
<emphasis>RemoveConfiguration </emphasis>– Removes one or more configuration entities from a media profile.</para>
</listitem>
</itemizedlist>
<para>The following commands manage Configuration Entities:</para>
<itemizedlist>
<listitem>
<para>
<emphasis>Get< entity>ConfigurationOptions</emphasis> – Gets the valid property values for a specific configuration entity.</para>
</listitem>
<listitem>
<para>
<emphasis>Get<entity>Configurations</emphasis> – Gets one or more configuration entities. The client may request a specific configuration by providing the configuration token, it may specify a profile token to get all compatible configurations. If no token is specified all existing configurations are returned.</para>
</listitem>
<listitem>
<para>
<emphasis>Set< entity>Configuration</emphasis> – Updates the settings of a configuration entity.</para>
</listitem>
</itemizedlist>
<para>Where <emphasis>< entity></emphasis> is the type of configuration entity. For example, the complete command to get a video encoder configuration is GetVideoEncoderConfiguration<emphasis>.</emphasis></para>
<para>The following commands initiate and manipulate a video/audio stream:</para>
<itemizedlist>
<listitem>
<para>
<emphasis>GetStreamUri </emphasis>– Requests a valid streaming URI for a specific media profile and protocol.</para>
</listitem>
<listitem>
<para>
<emphasis>StartMulticastStreaming </emphasis>– Starts multicast streaming using a specified media profile.</para>
</listitem>
<listitem>
<para>
<emphasis>StopMulticastStreaming </emphasis>– Stops a multicast stream.</para>
</listitem>
<listitem>
<para>
<emphasis>SetSynchronizationPoint</emphasis> – Inserts a synchronization point (I-frame etc) in active streams.</para>
</listitem>
<listitem>
<para>
<emphasis>GetSnapshotUri </emphasis>– Requests a URI for a specific media profile that can be used to obtain JPEG snapshots.</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>Video source mode</title>
<para>A device can have the capability for changing video source mode which is a setting of video source as exclusion in same time. For example, device’s capability for max resolution (1920x1080@16:9 or 2048x1536@4:3) and frame rate (20fps or 30fps) can be changed by selecting each video source modes.</para>
<para>The following commands manage video source mode.</para>
<itemizedlist>
<listitem>
<para>
<emphasis>GetVideoSourceModes</emphasis> - Get a list of video source modes.</para>
</listitem>
<listitem>
<para>
<emphasis>SetVideoSourceMode</emphasis> - Set video source mode to specified mode.</para>
</listitem>
</itemizedlist>
</section>
</chapter>
<chapter>
<title>Service</title>
<para>The media service is used to configure the device media streaming properties. </para>
<para>The media service allows a client to configure media and other real time streaming configurations. Media configurations are handled through media profiles. An overview of the ONVIF media configuration model is given in Section <xref linkend="_Toc241999828" />.</para>
<para>The media service commands are divided into two major categories:</para>
<itemizedlist>
<listitem>
<para>Media configuration:</para>
<itemizedlist>
<listitem>
<para>Media profile commands</para>
</listitem>
<listitem>
<para>Video source commands</para>
</listitem>
<listitem>
<para>Video encoder commands</para>
</listitem>
<listitem>
<para>Audio source commands</para>
</listitem>
<listitem>
<para>Audio encoder commands</para>
</listitem>
<listitem>
<para>Video analytics commands</para>
</listitem>
<listitem>
<para>Metadata commands</para>
</listitem>
<listitem>
<para>Audio output commands</para>
</listitem>
<listitem>
<para>Audio decoder commands</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Media streaming:</para>
<itemizedlist>
<listitem>
<para>Request stream URI</para>
</listitem>
<listitem>
<para>Get snapshot URI</para>
</listitem>
<listitem>
<para>Multicast control commands</para>
</listitem>
<listitem>
<para>Media synchronization point</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<para>A basic set of operations are required for the media service; other operations are recommended to support. The detailed requirements are listed under the command descriptions. </para>
<section>
<title>Media Profile Methods</title>
<section>
<title>CreateProfile</title>
<para>This operation creates a new media profile. The media profile shall be created in the device.</para>
<para>A device implementing this service shall support the creation of media profiles as long as the number of existing profiles does not exceed the capability value MaximumNumberOfProfiles.</para>
<para>A created profile shall be deletable and a device shall set the “fixed” attribute to false in the returned Profile.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">Name [tt:Name]</para>
<para role="text">Name of the new profile.</para>
<para role="param">Configuration - optional, unbounded [tr2:ConfigurationRef]</para>
<para role="text">Optional list of configurations to be added to the new profile. List entries with tr2:ConfigurationEnumeration value "All" shall be ignored.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">Token [tt:ReferenceToken]</para>
<para role="text">Token assigned to the newly created profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Receiver - ter:Action - ter:MaxNVTProfiles</para>
<para role="text">The maximum number of supported profiles supported by the device has been reached.</para>
<para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
<para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
<para role="text">One of the provided configurations indicated by their ConfigurationToken does not exist.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">ACTUATE</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>GetProfiles</title>
<para>An endpoint can ask for the existing media profiles of a device using the GetProfiles command. Both pre-configured and dynamically created profiles can be retrieved using this command.</para>
<para> The token parameter controls which profiles are returned:</para>
<itemizedlist>
<listitem>
<para>If no Token is provided this command lists all configured profiles of a device. </para>
</listitem>
<listitem>
<para>If a Token is provided the command either lists the referenced profile or responds with an error.</para>
</listitem>
</itemizedlist>
<para>The Type parameter controls which configurations are returned and has no effect on the number of profiles returned:</para>
<itemizedlist>
<listitem>
<para>If no Type is provided the returned profiles shall contain no configuration information.</para>
</listitem>
<listitem>
<para>If a single Type with value 'All' is provided the returned profiles shall include all associated configurations.</para>
</listitem>
<listitem>
<para>Otherwise the requested list of configurations shall for each profile include the configurations present as Type.</para>
</listitem>
</itemizedlist>
<para>A device implementing this service shall support the retrieval of media profiles through the GetProfiles command.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">Token - optional [tt:ReferenceToken]</para>
<para role="text">Optional token to retrieve exactly one profile.</para>
<para role="param">Type - optional, unbounded [xs:string]</para>
<para role="text">If one or more types are passed only the corresponding configurations will be returned.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">Profiles - optional, unbounded [tr2:MediaProfile]</para>
<para role="text">List of profiles. Each profile contains a set of configuration entities defining a specific configuration that can be used for media streaming, analytics, metadata streaming etc.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
<para role="text">The requested profile token does not exist.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">READ_MEDIA</para>
</listitem>
</varlistentry>
</variablelist>
<para xml:id="_Add_video_source">Note: a client can request an enumeration of profiles without any configuration details by not passing a Type parameter.</para>
</section>
<section>
<title>AddConfiguration</title>
<para>This operation adds one or more configurations to an existing media profile. If one of the configuration already exists in the media profile, it will be replaced. A device supporting the Media2 service shall support this command.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">ProfileToken [tt:ReferenceToken]</para>
<para role="text">Token of an existing profile.</para>
<para role="param">Name - optional [tt:Name]</para>
<para role="text">The device shall update the name of the profile when this option is provided.</para>
<para role="param">Configuration - optional, unbounded [tr2:ConfigurationRef]</para>
<para role="text">Optional list of configurations to be added to the profile. List entries with tr2:ConfigurationEnumeration value "All" shall be ignored.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="text">This is an empty message.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
<para role="text">The requested profile token does not exist.</para>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
<para role="text">One of the provided configurations indicated by their ConfigurationToken does not exist.</para>
<para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
<para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">ACTUATE</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>RemoveConfiguration</title>
<para>This operation removes one or more configurations from an existing media profile. Tokens appearing in the configuration list shall be ignored. Presence of the "All" type shall result in an empty profile. Removing a non-existing configuration shall be ignored and not result in an error. A device supporting the Media2 service shall support this command.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">ProfileToken [tt:ReferenceToken]</para>
<para role="text">Token of an existing profile.</para>
<para role="param">Configuration - unbounded [tr2:ConfigurationRef]</para>
<para role="text">List of configurations to be removed from the profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="text">This is an empty message.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
<para role="text">The requested profile token does not exist.</para>
<para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
<para role="text">Other configurations of the media profile are dependant on this configuration and removing it would cause a conflicting state of the media profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">ACTUATE</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>DeleteProfile</title>
<para>This operation deletes a profile. The device shall support the deletion of a media profile through the DeleteProfile command.</para>
<para>A device signaling support for MultiTrackStreaming shall support deleting of virtual profiles via the command. Note that deleting a profile of a virtual profile set may invalidate the virtual profile.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">Token [tt:ReferenceToken]</para>
<para role="text">Token of an existing profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="text">This is an empty message.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
<para role="text">The requested profile token does not exist.</para>
<para role="param">env:Sender - ter:Action - ter:DeletionOfFixedProfile</para>
<para role="text">A fixed Profile cannot be deleted.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">ACTUATE</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>CreateMultitrackConfiguration</title>
<para>This operation bundles a set of existing profiles to a so called virtual profile allowing multitrack streaming in a single RTSP session. </para>
<para>A device shall except a set of profiles where all VideoSourceConfiguration elements point to different video sources and the device is able to stream the set of video sources as a multitrack stream. If the method succeeds the device shall assign the returned virtual profile token to all profiles associated to the passed list of tokens. </para>
<para>Note that a device supporting multitrack streaming is typically shipped with one or more sets of virtual tokens. A client can use the GetProfiles command to retrieve all pre-configured profiles.</para>
<para>A device signaling support for MultiTrackStreaming shall support creating virtual profiles via this method. Virtual profiles can be deleted using DeleteProfile.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">ProfileToken -unbounded [tt:ReferenceToken]</para>
<para role="text">List of existing profile Tokens.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">VirtualProfileToken [tt:ReferenceToken]</para>
<para role="text">Token assigned to the newly created virtual profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
<para role="text">One or more passed profile tokens do not exist.</para>
<para role="param">env:Sender - ter:InvalidArgVal - ter: InvalidProfileToken</para>
<para role="text">The requested profiles can not be put together to create a virtual profile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">ACTUATE</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>
<section>
<title>Media Configurations</title>
<section>
<title>General</title>
<para>A media profile consists of a set of media configurations. Media profiles are used by a client to configure properties of a media stream from a device.</para>
<para>A device shall provide at least one media profile at boot. A device should provide “ready to use” profiles for the most common media configurations that the device offers. </para>
<para>A profile consists of a set of interconnected <emphasis>configuration entities. </emphasis>Configurations are provided by the device and can either be static or created dynamically by the device. For example, the dynamic configurations can be created by the device depending on current available encoding resources. See the following subsections for configuration entity specific constraints.</para>
<para>The following subsections enumerate the available configurations. A profile consists of all or a subset of these configuration entities. Depending on the capabilities of the device, a particular configuration entity can be part of a profile or not. For example, a profile with an audio source and an audio encoder configuration can exist only in a device with audio support.</para>
<para>A device shall support at least one Analytics Configuration if Analytics service is supported. A device shall support at least one PTZ Configuration if PTZ service is supported.</para>
<para>All configurations have the following base parameters</para>
<itemizedlist>
<listitem>
<para>Token – The identifier of the configuration.This parameter is read-only and cannot be modified by clients.</para>
</listitem>
<listitem>
<para>Name – A configurable name of up to 64 characters.</para>
</listitem>
<listitem>
<para>UseCount – Read-only property indicating the number of referenced profiles. Deprecated in Media2 – devices may support this value.</para>
</listitem>
</itemizedlist>
<para>Certain configurations in a media profile are dependent on other configurations. In such cases, a device should not allow adding the dependent configuration if the required configuration isn't present. Similarly, a device should not allow removing the required configuration unless the dependent configuration is removed first. Furthermore a device shall allow adding and removing both configurations in the same AddConfiguration respective RemoveConfiguration command. The dependencies are as follow:</para>
<itemizedlist>
<listitem>
<para>VideoEncoderConfiguration depends on VideoSourceConfiguration</para>
</listitem>
<listitem>
<para>AudioEncoderConfiguration depends on AudioSourceConfiguration </para>
</listitem>
<listitem>
<para>PTZConfiguration depends on VideoSourceConfiguration</para>
</listitem>
<listitem>
<para>AudioDecoderConfiguration depends on AudioOutputConfiguration </para>
</listitem>
<listitem>
<para>MetadataConfiguration depends on VideoSourceConfiguration</para>
</listitem>
<listitem>
<para>AnalyticsConfiguration depends on VideoSourceConfiguration and/or AudioSourceConfiguration</para>
</listitem>
</itemizedlist>
<para>If a dependency is violated in an AddConfiguration or RemoveConfiguration request, a ter:ConfigurationConflict fault should be returned in the response.</para>
</section>
<section>
<title>Video source configuration</title>
<para>A VideoSourceConfiguration contains a reference to a VideoSource and a Bounds
structure containing either the whole VideoSource pixel area or a sub-portion of it. The
Bounds and VideoSource define the image that is streamed to a client. The origin of the
bounds is located in the upper left corner of the video source.</para>
<para>The Rotate option specifies an optional rotation of the area defined by the Bounds
parameters. Three modes are defined:</para>
<variablelist>
<varlistentry>
<term>Off</term>
<listitem><para>The default value meaning that no rotation is present. The optional Degree shall be
ignored.</para></listitem>
</varlistentry>
<varlistentry>
<term>On</term>
<listitem><para>The device shall apply the rotation value provided by the Degree parameter. If absent a
rotation of 180 degree shall be applied.</para></listitem>
</varlistentry>
<varlistentry>
<term>Auto</term>
<listitem><para>The device shall take control over the Degree parameter and automatically update it so that a
client can query current rotation. The device shall return the current effective
rotation via the Degree parameter with the Video source configuration.</para></listitem>
</varlistentry>
</variablelist>
<para>Note that in case of e.g. a 90 degree rotation the width parameter corresponds to the
height of the Video and vice versa.</para>
<para>All coordinate systems (e.g. Normalized coordinate system of Privacy Masks in the Media2 Service and pixel based coordinate system of Motion Regions in the Analytics service) that apply to a video source configuration are based on the resulting image after applying the bounds and rotation to the source image.</para>
<para>The Lens Description option allows to describe the geometric distortion of the Video Source. For details see <xref linkend="_Ref425846456" />.</para>
<para>The Scene Orientation options allow a description of the orientation of the scene the video source is capturing. The Scene Orientation can be Below (from the ceiling), Above (from the floor or a table) and Horizon (on a wall). Some devices may support detecting the Scene Orientation automatically.</para>
<para>The View Mode option informs a client what type of view is represented by the video source. The view modes enumeration include</para>
<itemizedlist>
<listitem>
<para>Fisheye – Undewarped viewmode from a device supporting fisheye lens.</para>
</listitem>
<listitem>
<para>360Panorama – 360 degree panoramic view.</para>
</listitem>
<listitem>
<para>180Panorama – 180 degree panoramic view.</para>
</listitem>
<listitem>
<para>Quad – View mode combining four streams in single Quad, eg., applicable for devices supporting four heads.</para>
</listitem>
<listitem>
<para>Original – Unaltered view from the sensor.</para>
</listitem>
<listitem>
<para>LeftHalf – Viewmode combining the left side sensors, applicable for devices supporting multiple sensors.</para>
</listitem>
<listitem>
<para>RightHalf – Viewmode combining the right side sensors, applicable for devices supporting multiple sensors.</para>
</listitem>
<listitem>
<para>Dewarp – Dewarped view mode for device supporting fisheye lens.</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>Video encoder configuration</title>
<para>A VideoEncoderConfiguration contains the following parameters for configuring the encoding of video data:</para>
<itemizedlist>
<listitem>
<para>Encoding – The Video Media Subtype used to compress the video. See the [IANA Media Type Reference] for a full list of values.</para>
</listitem>
<listitem>
<para>Resolution – The pixel resolution of the encoded video data.</para>
</listitem>
<listitem>
<para>Quality – Determines the quality of the video. A high value within supported quality range means higher quality.</para>
</listitem>
<listitem>
<para>RateControl – Defines parameters to configure the bitrate [kbps] as well as an EncodingInterval parameter (Interval at which images are encoded and transmitted) and a TargetFrameRate [fps] parameter to configure the output framerate.</para>