This operation adds one or more Configurations to an existing media profile. If a configuration exists in the media profile, it will be replaced. A device shall support adding a compatible Configuration to a Profile containing a VideoSourceConfiguration and shall support streaming video data of such a profile.
Note that OSD elements must be added via the CreateOSD command.
Optionalconfiguration?: ConfigurationRefExtended[]List of configurations to be added. The types shall be provided in the order defined by tr2:ConfigurationEnumeration. List entries with tr2:ConfigurationEnumeration value "All" shall be ignored.
Optionalname?: stringOptional item. If present updates the Name property of the profile.
OptionalprofileToken?: stringReference to the profile where the configuration should be added
Create the Mask.
const { token } = await cam.media2.createMask({
type: 'Color',
token: 'mask_token_1',
color: { X: 1, Y: 2, Z: 3, colorspace: 'http://www.onvif.org/ver10/colorspace/YCbCr' },
configurationToken: 'VideoSourceConfigurationToken_1',
enabled: true,
polygon: {
point: [{ x: 0.1, y: 0.1 }, { x: 0.2, y: 0.2 }, { x: 0.3, y: 0.3 }],
}
});
Create the OSD. NB!: Unlike the reference implementation, this method returns the generated configuration, since not all implementations allow you to specify the token yourself; it is often generated on the server side.
This operation creates a new media profile. A created profile created via this method may be deleted via the DeleteProfile method. Optionally Configurations can be assigned to the profile on creation. For details regarding profile assignment check also the method AddConfiguration.
Optionalconfiguration?: ConfigurationRefExtended[]Optional set of configurations to be assigned to the profile. List entries with tr2:ConfigurationEnumeration value "All" shall be ignored.
friendly name of the profile to be created
This operation deletes a profile. The device shall support the deletion of a media profile through the DeletePro- file command. 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.
This element contains a reference to the profile that should be deleted.
The getAnalyticsConfigurations operation allows to retrieve the analytics settings of one ore more
configurations.
Optionaloptions: GetAnalyticsConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
This command list the audio decoding capabilities for a given profile and configuration of a device.
The getAudioDecoderConfigurations operation allows to retrieve the audio decoder settings of one ore more
configurations.
Optionaloptions: GetAudioDecoderConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
This operation returns the available options (supported values and ranges for audio encoder configuration parameters) when the audio encoder parameters are reconfigured.
The getAudioEncoderConfigurations operation allows to retrieve the audio encoder settings of one ore more
configurations.
Optionaloptions: GetAudioEncoderConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
This operation returns the available options (supported values and ranges for audio output configuration parameters) for configuring an audio output. To retrieve the EQPresetList, a valid ConfigurationToken must be provided. If EQPreset is supported and isFrequencyDecibelEditable is signaled as true, the response shall include the FrequencyDecibelPair.
The getAudioOutputConfigurations operation allows to retrieve the audio output settings of one ore more
configurations.
Optionaloptions: GetAudioOutputConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
This operation returns the available options (supported values and ranges for audio source configuration parameters) when the audio source parameters are reconfigured. If an audio source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile.
The getAudioSourceConfigurations operation allows to retrieve the audio source settings of one ore more
configurations.
Optionaloptions: GetAudioSourceConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
This operation lists existing Mask configurations for the device.
Optionaloptions: GetMasksThis operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration.
The getMetadataConfigurations operation allows to retrieve the metadata settings of one ore more
configurations.
Optionaloptions: GetMetadataConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
Get the OSD Options.
This operation lists existing OSD configurations for the device.
Optionaloptions: GetOSDsRetrieve the profile with the specified token or all defined media profiles.
Optionaltoken?: stringOptional token of the requested profile.
Optionaltype?: string[]The types shall be provided as defined by tr2:ConfigurationEnumeration.
Returns the capabilities of the media service. The result is returned in a typed answer.
Optionaloptions: GetSnapshotUriThis operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol. The returned URI shall remain valid indefinitely even if the profile is changed.
Defined stream types are: RtspUnicast RTSP streaming RTP as UDP Unicast. RtspMulticast RTSP streaming RTP as UDP Multicast. RTSP RTSP streaming RTP over TCP. RtspOverHttp Tunneling both the RTSP control channel and the RTP stream over HTTP or HTTPS.
If a multicast stream is requested at least one of VideoEncoder2Configuration, AudioEncoder2Configuration and MetadataConfiguration shall have a valid multicast setting.
This operation returns the available options (supported values and ranges for video encoder configuration parameters) when the video encoder parameters are reconfigured.
This response contains the available video encoder configuration options. If a video encoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
The getVideoEncoderConfigurations operation allows to retrieve the video encoder settings of one ore more
configurations.
Optionaloptions: GetVideoEncoderConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
The GetVideoEncoderInstances command can be used to request the minimum number of guaranteed video encoder instances (applications) per Video Source Configuration.
This operation returns the available options (supported values and ranges for video source configuration parameters) when the video source parameters are reconfigured If a video source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile.
The getVideoSourceConfigurations operation allows to retrieve the video source settings of one ore more
configurations.
Optionaloptions: GetVideoSourceConfigurations
OptionalconfigurationToken?: stringToken of the requested configuration.
OptionalprofileToken?: stringContains the token of an existing media profile the configurations shall be compatible with.
A device returns the information for current video source mode and settable video source modes of specified video source. A device that indicates a capability of VideoSourceModes shall support this command.
Optionaloptions: GetVideoSourceModesProtectedgetProtected Experimental
The getWebRTCConfigurations operation allows to retrieve the WebRTC settings of one ore more
configurations.
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
Optionalconfiguration?: ConfigurationRefExtended[]List of configurations to be removed. The types shall be provided in the order defined by tr2:ConfigurationEnumeration. Tokens appearing in the configuration list shall be ignored. Presence of the "All" type shall result in an empty profile.
OptionalprofileToken?: stringThis element contains a reference to the media profile from which the configuration shall be removed.
Optionaloptions: LineraseOptionsThis operation modifies an audio decoder configuration.
This operation modifies an audio encoder configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected streams. NVC methods for changing a running stream are out of scope for this specification.
This operation modifies an audio output configuration.
This operation modifies an audio source configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream NVC methods for changing a running stream are out of scope for this specification.
This operation modifies a metadata configuration. Running streams using this configuration may be updated immediately according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected streams. NVC methods for changing a running stream are out of scope for this specification.
This operation modifies a video encoder configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification. SessionTimeout is provided as a hint for keeping rtsp session by a device. If necessary the device may adapt parameter values for SessionTimeout elements without returning an error. For the time between keep alive calls the client shall adhere to the timeout value signaled via RTSP.
This operation modifies a video source configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification.
SetVideoSourceMode changes the media profile structure relating to video source for the specified video source mode. A device that indicates a capability of VideoSourceModes shall support this command. The behavior after changing the mode is not defined in this specification.
This command starts multicast streaming using a specified media profile of a device. Streaming continues until StopMulticastStreaming is called for the same Profile. The streaming shall continue after a reboot of the device until a StopMulticastStreaming request is received. The multicast address, port and TTL are configured in the VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration respectively.
This command stops multicast streaming using a specified media profile of a device
Media service, ver20 profile