easy_onvif_cli 3.1.0+1 easy_onvif_cli: ^3.1.0+1 copied to clipboard
A pure Dart library designed primarily for command line automation of Onvif compatible devices.
Easy Onvif Command Line Interface (CLI) #
A command line interface application for controlling an Onvif device through terminal commands. This tool allows you to use O/S features like cron
to automate Onvif device functionality.
Table of Contents #
- Installation
- Quick start
- Commands
- authorize
- device-management
- device-management create-users
- device-management delete-users
- device-management get-capabilities
- device-management get-device-information
- device-management get-discovery-mode
- device-management get-dns
- device-management get-endpoint-reference
- device-management get-hostname
- device-management get-network-protocols
- device-management get-ntp
- device-management get-service-capabilities
- device-management get-services
- device-management get-storage-configuration
- device-management get-storage-configurations
- device-management get-system-date-and-time
- device-management get-system-log
- device-management get-system-support-information
- device-management get-system-uris
- device-management get-users
- device-management system-reboot
- debug
- media1
- media2
- probe
- ptz
- ptz get-compatible-configurations
- ptz get-configuration
- ptz get-configuration-options
- ptz get-configurations
- ptz get-current-preset
- ptz get-preset-tour
- ptz get-preset-tours
- ptz get-presets
- ptz get-service-capabilities
- ptz get-status
- ptz goto-preset
- ptz move
- ptz move-down
- ptz move-left
- ptz move-right
- ptz move-up
- ptz relative-move
- ptz remove-preset
- ptz set-home-position
- ptz set-preset
- ptz stop
- ptz zoom
- ptz zoom-in
- ptz zoom-out
- recordings
- recordings create-recording
- recordings create-recording-job
- recordings delete-recording-job
- recordings delete-recordings
- recordings get-recording-job-state
- recordings get-recording-jobs
- recordings get-recording-options
- recordings get-recordings
- recordings get-service-capabilities
- recordings set-recording-job-mode
- replay
- version
Installation #
Install using dart pub
:
dart pub global activate easy_onvif_cli
Run the following command to see help:
onvif --help
Result,
A command line interface for controlling Onvif compliant devices
Usage: onvif <command> [arguments]
Global options:
-h, --help Print this usage information.
--config-file (defaults to "$HOME/.onvif/credentials.json")
--log-level [all, debug, info, warning, error, off (default)]
Available commands:
authorize Generate an authentication file for an Onvif device.
debug Generate a debug bundle for an Onvif device.
device-management Device management commands.
media1 Media ver10 commands.
media2 Media ver20 commands.
probe Probe/device discovery command.
ptz PTZ commands.
recordings Recordings commands.
replay Replay commands.
search Search commands.
version Display the package name and version.
command | description |
---|---|
authorize | Generate a credentials file used to authenticate the command line API requests |
debug | Generate a debug bundle for an Onvif device. |
device-management | Onvif device management commands, spec |
media1 | Onvif media ver10 commands, spec |
media2 | Onvif media ver20 commands, spec |
probe | Probe/device discovery command |
ptz | Onvif PTZ commands, spec |
recordings | Recordings commands, spec |
replay | Replay commands, spec |
version | Display the package name and version. |
Just like the main library, any responses provided by the above commands will be given in the JSON format. So ideally, you will want to use a command line json parser to interpret the results. The recommended json parser for this purpose is jq. With jq you can process the results of a command as follows:
Quick start #
#step 1
onvif authorize
#follow prompts
#step 2
onvif ptz get-presets --limit 3 --profile-token Profile_1 | jq -r '.[] | ."@token" + "\t" + .Name'
#output would be
1 Preset 1
2 Preset 2
3 Preset 3
Commands #
authorize #
onvif authorize --help
Generate a refresh token used to authenticate the command line API requests
Usage: onvif authorize [arguments]
-h, --help Print this usage information.
The authorize command is used to create the default "--config-file" that can be used as the default for all future commands. In general this command will only need to be run if you want to connect to another onvif device or if the settings (host, username, password) have changed for the current device. The file contents are as follows:
{"host":"[host name or ip address of device]","username":"[device username]","password":"[device password]"}
device-management #
onvif device-management --help
Device management commands.
Usage: onvif device-management <subcommand> [arguments]
-h, --help Print this usage information.
Usage: onvif device-management <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
create-users This operation creates new device users and corresponding credentials on a device for authentication purposes. The device shall support creation of device users and their credentials through the CreateUsers command. Either all users are created successfully or a fault message shall be returned without creating any user.
delete-users This operation deletes the given storage configuration and configuration change shall always be persistent.
get-capabilities This method has been replaced by the more generic GetServices method. For capabilities of individual services refer to the GetServiceCapabilities methods.
get-device-information This operation gets basic device information from the device.
get-discovery-mode This operation gets the discovery mode of a device. See Section 7.2 for the definition of the different device discovery modes. The device shall support retrieval of the discovery mode setting through the GetDiscoveryMode command.
get-dns This operation gets the DNS settings from a device. The device shall return its DNS configurations through the GetDNS command.
get-endpoint-reference A client can ask for the device service endpoint reference address property that can be used to derive the password equivalent for remote user operation.
get-hostname This operation is used by an endpoint to get the hostname from a device. The device shall return its hostname configurations through the GetHostname command.
get-network-protocols This operation gets defined network protocols from a device. The device shall support the GetNetworkProtocols command returning configured network protocols.
get-ntp This operation gets defined network protocols from a device. The device shall support This operation gets the NTP settings from a device. If the device supports NTP, it shall be possible to get the NTP server settings through the GetNTP command.
get-service-capabilities Returns the capabilities of the device service. The result is returned in a typed answer.
get-services Returns information about services on the device.
get-storage-configuration This operation retrieves the Storage configuration associated with the given storage configuration token.
get-storage-configurations This operation retrieves the Storage configuration associated with the given storage configuration token.
get-system-date-and-time This operation gets the device system date and time. The device shall support the return of the daylight saving setting and of the manual system date and time (if applicable) or indication of NTP time (if applicable) through the GetSystemDateAndTime command.
get-system-log This operation gets a system log from the device.
get-system-support-information This operation gets arbitrary device diagnostics information from the device.
get-system-uris This operation is used to retrieve URIs from which system information may be downloaded using HTTP
get-users This operation lists the registered users and corresponding credentials on a device. The device shall support retrieval of registered device users and their credentials for the user token through the GetUsers command.
system-reboot This operation reboots the device.
device-management create-users
onvif device-management create-users --help
This operation creates new device users and corresponding credentials on a device for authentication purposes. The device shall support creation of device users and their credentials through the CreateUsers command. Either all users are created successfully or a fault message shall be returned without creating any user.
Usage: onvif device-management create-users [arguments]
-h, --help Print this usage information.
-f, --users-file=<yaml or json file path> The path to the file that lists users to be created, cannot be used with other options.
-u, --username=<string> Username string.
-p, --password=<string> Password string.
-l, --user-level=<enum> User level string.
[administrator, operator, user, anonymous, extended]
device-management delete-users
onvif device-management delete-users --help
This operation creates new device users and corresponding credentials on a device for authentication purposes. The device shall support creation of device users and their credentials through the CreateUsers command. Either all users are created successfully or a fault message shall be returned without creating any user.
Usage: onvif device-management create-users [arguments]
-h, --help Print this usage information.
-f, --users-file=<yaml or json file path> The path to the file that lists users to be created, cannot be used with other options.
-u, --username=<string> Username string.
-p, --password=<string> Password string.
-l, --user-level=<enum> User level string.
[administrator, operator, user, anonymous, extended]
device-management get-capabilities
onvif device-management get-capabilities --help
This method has been replaced by the more generic GetServices method. For capabilities of individual services refer to the GetServiceCapabilities methods.
Usage: onvif device-management get-capabilities [arguments]
-h, --help Print this usage information.
device-management get-device-information
onvif device-management get-device-information --help
This operation gets basic device information from the device.
Usage: onvif device-management get-device-information [arguments]
-h, --help Print this usage information.
device-management get-discovery-mode
onvif device-management get-discovery-mode --help
This operation gets the discovery mode of a device. See Section 7.2 for the definition of the different device discovery modes. The device shall support retrieval of the discovery mode setting through the GetDiscoveryMode command.
Usage: onvif device-management get-device-information [arguments]
-h, --help Print this usage information.
device-management get-dns
onvif device-management get-dns --help
This operation gets the DNS settings from a device. The device shall return its DNS configurations through the GetDNS command.
Usage: onvif device-management get-device-information [arguments]
-h, --help Print this usage information.
device-management get-endpoint-reference
onvif device-management get-endpoint-reference --help
A client can ask for the device service endpoint reference address property that can be used to derive the password equivalent for remote user operation.
Usage: onvif device-management get-endpoint-reference [arguments]
-h, --help Print this usage information.
device-management get-hostname
onvif device-management get-hostname --help
This operation is used by an endpoint to get the hostname from a device. The device shall return its hostname configurations through the GetHostname command.
Usage: onvif device-management get-hostname [arguments]
-h, --help Print this usage information.
device-management get-network-protocols
onvif device-management get-network-protocols --help
This operation gets defined network protocols from a device. The device shall support the GetNetworkProtocols command returning configured network protocols.
Usage: onvif device-management get-network-protocols [arguments]
-h, --help Print this usage information.
device-management get-ntp
onvif device-management get-ntp --help
This operation gets defined network protocols from a device. The device shall support This operation gets the NTP settings from a device. If the device supports NTP, it shall be possible to get the NTP server settings through the GetNTP command.
Usage: onvif device-management get-ntp [arguments]
-h, --help Print this usage information.
device-management get-service-capabilities
onvif device-management get-service-capabilities --help
Returns the capabilities of the device service. The result is returned in a typed answer.
Usage: onvif device-management get-service-capabilities [arguments]
-h, --help Print this usage information.
device-management get-services
onvif device-management get-services --help
Returns information about services on the device.
Usage: onvif device-management get-services [arguments]
-h, --help Print this usage information.
-i, --[no-]include-capability Indicates if the service capabilities (untyped) should be included in the response.
device-management get-storage-configuration
onvif device-management get-storage-configuration --help
This operation retrieves the Storage configuration associated with the given storage configuration token.
Usage: onvif device-management get-storage-configuration [arguments]
-h, --help Print this usage information.
-t, --storage-token (mandatory) Unique identifier referencing the physical entity.
device-management get-storage-configurations
onvif device-management get-storage-configurations --help
This operation lists all existing storage configurations for the device.
Usage: onvif device-management get-storage-configurations [arguments]
-h, --help Print this usage information.
device-management get-system-date-and-time
onvif device-management get-system-date-and-time --help
This operation gets the device system date and time. The device shall support the return of the daylight saving setting and of the manual system date and time (if applicable) or indication of NTP time (if applicable) through the GetSystemDateAndTime command.
A device shall provide the UTCDateTime information.
Usage: onvif device-management get-system-date-and-time [arguments]
-h, --help Print this usage information.
device-management get-system-log
onvif device-management get-system-log --help
This operation gets a system log from the device.
Usage: onvif device-management get-system-log [arguments]
-h, --help Print this usage information.
-t, --type Specifies the type of system log to get.
[Access] Indicates that a access log is requested.
[System] (default) Indicates that a system log is requested.
device-management get-system-support-information
onvif device-management get-system-support-information --help
This operation gets arbitrary device diagnostics information from the device.
Usage: onvif device-management get-system-support-information [arguments]
-h, --help Print this usage information.
device-management get-system-uris
onvif device-management get-system-uris --help
This operation is used to retrieve URIs from which system information may be downloaded using HTTP
Usage: onvif device-management get-system-uris [arguments]
-h, --help Print this usage information.
device-management get-users
onvif device-management get-users --help
This operation lists the registered users and corresponding credentials on a device. The device shall support retrieval of registered device users and their credentials for the user token through the GetUsers command.
Usage: onvif device-management get-users [arguments]
-h, --help Print this usage information.
device-management system-reboot
onvif device-management system-reboot --help
This operation reboots the device.
Usage: onvif device-management system-reboot [arguments]
-h, --help Print this usage information.
debug #
onvif debug --help
Generate a debug bundle for an Onvif device.
Usage: onvif debug [arguments]
-h, --help Print this usage information.
-o, --output-folder=<file path> destination folder for debug bundle
(defaults to "debug")
media1 #
onvif media --help
Media1 commands.
Usage: onvif media1 <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-audio-sources This command lists all available physical audio inputs of the device.
get-metadata-configuration The GetMetadataConfiguration command fetches the metadata configuration if the metadata token is known.
get-metadata-configurations This operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration.
get-profile If the profile token is already known, a profile can be fetched through the GetProfile command.
get-profiles Any endpoint can ask for the existing media profiles of a device using the GetProfiles command. Pre-configured or dynamically configured profiles can be retrieved using this command. This command lists all configured profiles in a device. The client does not need to know the media profile in order to use the command.
get-service-capabilities Returns the capabilities of the media service. The result is returned in a typed answer.
get-snapshot-uri A client uses the GetSnapshotUri command to obtain a JPEG snapshot from the device.
get-stream-uri This operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol
get-video-sources This command lists all available physical video inputs of the device.
start-multicast-streaming This command starts multicast streaming using a specified media profile of a device.
stop-multicast-streaming This command stop multicast streaming using a specified media profile of a device.
media1 get-audio-sources
onvif media1 get-audio-sources --help
This command lists all available physical audio inputs of the device.
Usage: onvif media1 get-audio-sources [arguments]
-h, --help Print this usage information.
media1 get-metadata-configuration
onvif media1 get-metadata-configuration --help
This command lists all available physical audio inputs of the device.
Usage: onvif media1 get-metadata-configuration [arguments]
-h, --help Print this usage information.
-t, --configuration-token=<string> (mandatory) Token of the requested metadata configuration.
media1 get-metadata-configuration
onvif media1 get-metadata-configurations --help
This operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration.
Usage: onvif media1 get-metadata-configurations [arguments]
-h, --help Print this usage information.
--configuration-token=<string> Optional metadata configuration token that specifies an existing configuration that the options are intended for.
--profile-token=<string> Optional ProfileToken that specifies an existing media profile that the options shall be compatible with.
media1 get-profile
onvif media1 get-profile --help
If the profile token is already known, a profile can be fetched through the GetProfile command.
Usage: onvif media1 get-profile [arguments]
-h, --help Print this usage information.
-t, --profile-token=<string> (mandatory) Token of the requested media profile.
media1 get-profiles
onvif media1 get-profiles --help
Any endpoint can ask for the existing media profiles of a device using the GetProfiles command. Pre-configured or dynamically configured profiles can be retrieved using this command. This command lists all configured profiles in a device. The client does not need to know the media profile in order to use the command.
Usage: onvif media1 get-profiles [arguments]
-h, --help Print this usage information.
media1 get-service-capabilities
onvif media1 get-service-capabilities --help
Returns the capabilities of the media service. The result is returned in a typed answer.
Usage: onvif media1 get-service-capabilities [arguments]
-h, --help Print this usage information.
media1 get-snapshot-uri
onvif media1 get-snapshot-uri --help
A client uses the GetSnapshotUri command to obtain a JPEG snapshot from the device.
Usage: onvif media1 get-snapshot-uri [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
media1 get-stream-uri
onvif media1 get-stream-uri --help
This operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol.
Usage: onvif media1 get-stream-uri [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--stream-setup-stream=<stream type> Defines if a multicast or unicast stream is requested
[RTP-Unicast, RTP-Multicast (default)]
--stream-setup-transport-protocol=<transport protocol> Defines the network protocol for streaming, either UDP=RTP/UDP, RTSP=RTP/RTSP/TCP or HTTP=RTP/RTSP/HTTP/TCP
[UDP, TCP, RTSP (default), HTTP]
media1 get-video-sources
onvif media1 get-video-sources --help
This command lists all available physical video inputs of the device.
Usage: onvif media1 get-video-sources [arguments]
media1 start-multicast-streaming
onvif media1 start-multicast-streaming --help
This command starts multicast streaming using a specified media profile of a device.
Usage: onvif media1 start-multicast-streaming [arguments]
-h, --help Print this usage information.
media1 stop-multicast-streaming
onvif media1 stop-multicast-streaming --help
This command stop multicast streaming using a specified media profile of a device.
Usage: onvif media1 stop-multicast-streaming [arguments]
-h, --help Print this usage information.
media2 #
onvif media2 --help
Media2 commands.
Usage: onvif media2 <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-metadata-configuration-options This operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration.
get-metadata-configurations By default this operation lists all existing metadata configurations for a device. Provide a profile token to list only configurations that are compatible with the profile. If a configuration token is provided only a single configuration will be returned.
get-profiles Retrieve the profile with the specified token or all defined media profiles.
get-service-capabilities Returns the capabilities of the media service. The result is returned in a typed answer.
get-snapshot-uri A client uses the GetSnapshotUri command to obtain a JPEG snapshot from the device.
get-stream-uri This operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol
get-video-encoder-instances The GetVideoEncoderInstances command can be used to request the minimum number of guaranteed video encoder instances (applications) per Video Source Configuration.
start-multicast-streaming This command starts multicast streaming using a specified media profile of a device.
stop-multicast-streaming This command stop multicast streaming using a specified media profile of a device.
media2 get-metadata-configuration-options
onvif media2 get-metadata-configuration-options --help
This operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration.
Usage: onvif media2 get-metadata-configuration-options [arguments]
-h, --help Print this usage information.
--configuration-token=<string> Token of the requested configuration.
--profile-token=<string> Contains the token of an existing media profile the configurations shall be compatible with.
media2 get-metadata-configurations
onvif media2 get-metadata-configurations --help
By default this operation lists all existing metadata configurations for a device. Provide a profile token to list only configurations that are compatible with the profile. If a configuration token is provided only a single configuration will be returned.
Usage: onvif media2 get-metadata-configurations [arguments]
-h, --help Print this usage information.
--configuration-token=<string> Token of the requested configuration.
--profile-token=<string> Contains the token of an existing media profile the configurations shall be compatible with.
media2 get-profiles
onvif media2 get-profiles --help
Retrieve the profile with the specified token or all defined media profiles.
Usage: onvif media2 get-profiles [arguments]
-h, --help Print this usage information.
--reference-token=<string> Optional token of the requested profile.
--type=<comma delimited string> The types shall be provided as defined by tr2:ConfigurationEnumeration.
[All, Analytics, AudioSource, AudioDecoder, AudioEncoder, AudioOutput, Metadata, VideoEncoder, VideoSource, PTZ]
media2 get-service-capabilities
onvif media2 get-service-capabilities --help
Returns the capabilities of the media service. The result is returned in a typed answer.
Usage: onvif media2 get-service-capabilities [arguments]
-h, --help Print this usage information.
media2 get-snapshot-uri
onvif media2 get-snapshot-uri --help
A client uses the GetSnapshotUri command to obtain a JPEG snapshot from the device.
Usage: onvif media2 get-snapshot-uri [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
media2 get-stream-uri
onvif media2 get-stream-uri --help
This operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol.
Usage: onvif media2 get-stream-uri [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--protocol=<transport protocol> The Protocol defines how the encoded data is expected to be streamed to the client
[RtspUnicast, RtspMulticast, RTSP (default), RtspsUnicast, RtspsMulticast, RtspOverHttp]
media2 get-video-encoder-instances
onvif media2 get-video-encoder-instances --help
The get-video-encoder-instances command can be used to request the minimum number of guaranteed video encoder instances (applications) per Video Source Configuration.
Usage: onvif media2 get-video-encoder-instances [arguments]
-h, --help Print this usage information.
--configuration-token=<string> (mandatory) Token of the video source configuration
media2 start-multicast-streaming
onvif media2 start-multicast-streaming --help
This command starts multicast streaming using a specified media profile of a device.
Usage: onvif media2 start-multicast-streaming [arguments]
-h, --help Print this usage information.
media2 stop-multicast-streaming
onvif media2 stop-multicast-streaming --help
This command stop multicast streaming using a specified media profile of a device.
Usage: onvif media2 stop-multicast-streaming [arguments]
-h, --help Print this usage information.
probe #
onvif probe --help
Probe/device discovery command.
Usage: onvif probe [arguments]
-h, --help Print this usage information.
-t, --timeout=<number> The number of seconds to accept probe responses from devices.
(defaults to "2")
ptz #
onvif ptz --help
PTZ commands.
Usage: onvif ptz <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
absolute-move Operation to move pan,tilt or zoom to a absolute destination.
continuous-move Operation for continuous Pan/Tilt and Zoom movements.
get-compatible-configurations Contains the token of an existing media profile the configurations shall be compatible with.
get-configuration Get a specific PTZconfiguration from the device, identified by its reference token or name.
get-configuration-options Token of an existing configuration that the options are intended for.
get-configurations Get all the existing PTZConfigurations from the device.
get-current-preset Helper function to get the matching preset for the current PtzPosition and Zoom if there is a match
get-preset-tour Operation to request a specific PTZ preset tour in the selected media profile.
get-preset-tours Operation to request PTZ preset tours in the selected media profiles.
get-presets Operation to request all PTZ presets for the PTZNode in the selected profile.
get-service-capabilities Returns the capabilities of the PTZ service. The result is returned in a typed answer.
get-status Operation to request PTZ status for the Node in the selected profile.
goto-home-position Operation to move the PTZ device to it's "home" position. The operation is supported if the HomeSupported element in the PTZNode is true.
goto-preset Operation to go to a saved preset position for the PTZNode in the selected profile.
move Operation for Relative Pan/Tilt Move without Zoom.
move-down Operation for a single step tilt down operation.
move-left Operation for a single step pan left operation.
move-right Operation for a single step pan right operation
move-up Operation for a single step tilt upwards operation.
relative-move Operation for Relative Pan/Tilt and Zoom Move.
remove-preset Operation to remove a PTZ preset for the Node in the selected profile.
set-home-position Operation to save current position as the home position. The SetHomePosition command returns with a failure if the “home” position is fixed and cannot be overwritten. If the SetHomePosition is successful, it is possible to recall the Home Position with the GotoHomePosition command.
set-preset The SetPreset command saves the current device position parameters so that the device can move to the saved preset position through the GotoPreset operation.
stop Operation to stop ongoing pan, tilt and zoom movements of absolute relative and continuous type.
zoom Operation for zoom.
zoom-in Operation for a single step zoom in operation.
zoom-out Operation for a single step zoom out operation.
ptz absolute-move
onvif ptz absolute-move --help
Operation to move pan,tilt or zoom to a absolute destination.
Usage: onvif ptz absolute-move [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--pan-tilt-x=<double> (mandatory) A Position vector specifying the absolute target position x-axis.
--pan-tilt-y=<double> (mandatory) A Position vector specifying the absolute target position y-axis.
--pan-tilt-zoom=<double> (mandatory) A Position vector specifying the absolute target position zoom.
ptz continuous-move
onvif ptz continuous-move --help
Operation for continuous Pan/Tilt and Zoom movements.
Usage: onvif ptz continuous-move [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--pan-tilt-x=<double> (mandatory) A Position vector specifying the absolute target position x-axis.
--pan-tilt-y=<double> (mandatory) A Position vector specifying the absolute target position y-axis.
--pan-tilt-zoom=<double> (mandatory) A Position vector specifying the absolute target position zoom.
ptz get-compatible-configurations #
onvif ptz get-compatible-configurations --help
Contains the token of an existing media profile the configurations shall be compatible with.
Usage: onvif ptz get-compatible-configurations [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
ptz get-configuration
onvif ptz get-configuration --help
Option ptz-configuration-token is mandatory.
Usage: onvif ptz get-configuration [arguments]
-h, --help Print this usage information.
-t, --ptz-configuration-token=<token> (mandatory) Token of the requested PTZConfiguration.
ptz get-configuration-options
onvif ptz get-configuration-options --help
List supported coordinate systems including their range limitations.
Usage: onvif ptz get-configuration-options [arguments]
-h, --help Print this usage information.
-t, --configuration-token=<token> (mandatory) Token of an existing configuration that the options are intended for.
ptz get-configurations
onvif ptz get-configurations --help
Get all the existing PTZConfigurations from the device.
Usage: onvif ptz get-configurations [arguments]
-h, --help Print this usage information.
ptz get-current-preset
onvif ptz get-current-preset --help
Helper function to get the matching preset for the current PtzPosition and Zoom if there is a match
Usage: onvif ptz get-current-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
ptz get-preset-tour
onvif ptz get-preset-tour --help
Operation to request a specific PTZ preset tour in the selected media profile.
Usage: onvif ptz get-preset-tour [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-tour-token=<token> (mandatory) A requested preset tour token.
ptz get-preset-tours
onvif ptz get-preset-tours --help
Operation to request PTZ preset tours in the selected media profiles.
Usage: onvif ptz get-preset-tours [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) A reference to the MediaProfile where the operation should take place.
ptz get-presets
onvif ptz get-presets --help
Operation to request all PTZ presets for the PTZNode in the selected profile.
Usage: onvif ptz get-presets [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) A reference to the MediaProfile where the operation should take place.
--limit=<int> Limit the number of presets returned
ptz get-service-capabilities
onvif ptz get-service-capabilities --help
Returns the capabilities of the PTZ service. The result is returned in a typed answer.
Usage: onvif ptz get-service-capabilities [arguments]
ptz get-status
onvif ptz get-status --help
Operation to request PTZ status for the Node in the selected profile.
Usage: onvif ptz get-status [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) A reference to the MediaProfile where the PTZStatus should be requested.
ptz goto-preset
onvif ptz goto-preset --help
Option profile-token is mandatory.
Usage: onvif ptz goto-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-token=<preset-token> (mandatory) A requested preset token.
ptz move
onvif ptz move --help
Operation for Relative Pan/Tilt Move without Zoom.
Usage: onvif ptz move [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--x=<double> (mandatory) The x component corresponds to pan.
--y=<double> (mandatory) The y component corresponds to tilt.
ptz move-down
onvif ptz goto-preset --help
Operation for a single step tilt down operation.
Usage: onvif ptz goto-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-token=<preset-token> (mandatory) A requested preset token.
ptz move-left
onvif ptz goto-preset --help
Operation for a single step pan left operation
Usage: onvif ptz goto-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-token=<preset-token> (mandatory) A requested preset token.
ptz move-right
onvif ptz goto-preset --help
Operation for a single step pan right operation
Usage: onvif ptz goto-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-token=<preset-token> (mandatory) A requested preset token.
ptz move-up
onvif ptz move-up --help
Operation for a single step tilt upwards operation.
Usage: onvif ptz move-up [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--step=<int> The amount of movement for the step.
ptz relative-move
onvif ptz relative-move --help
Operation for Relative Pan/Tilt and Zoom Move.
Usage: onvif ptz relative-move [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--translation-x=<double> Pan and tilt speed. The x component corresponds to pan. If omitted in a request, the current (if any) PanTilt movement should not be affected.
--translation-y=<double> Pan and tilt speed. The y component corresponds to tilt. If omitted in a request, the current (if any) PanTilt movement should not be affected.
--translation-zoom=<double> A zoom speed. If omitted in a request, the current (if any) Zoom movement should not be affected.
ptz remove-preset
onvif ptz remove-preset --help
Operation to remove a PTZ preset for the Node in the selected profile.
Usage: onvif ptz remove-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-token=<preset-token> (mandatory) A requested preset token.
ptz set-home-position
onvif ptz set-home-position --help
Operation to save current position as the home position. The SetHomePosition command returns with a failure if the “home” position is fixed and cannot be overwritten. If the SetHomePosition is successful, it is possible to recall the Home Position with the GotoHomePosition command.
Usage: onvif ptz set-home-position [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should be set.
ptz set-preset
onvif ptz set-preset --help
The SetPreset command saves the current device position parameters so that the device can move to the saved preset position through the GotoPreset operation.
Usage: onvif ptz set-preset [arguments]
-h, --help Print this usage information.
-t, --profile-token=<profile-token> (mandatory) A reference to the MediaProfile where the operation should take place.
--preset-token=<preset-token> (mandatory) A requested preset token.
--preset-name=<name> (mandatory)
ptz stop
onvif ptz stop --help
Operation to stop ongoing pan, tilt and zoom movements of absolute relative and continuous type.
Usage: onvif ptz stop [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--[no-]pan-tilt Set true when we want to stop ongoing pan and tilt movements.If PanTilt arguments are not present, this command stops these movements.
(defaults to on)
--[no-]zoom Set true when we want to stop ongoing zoom movement.If Zoom arguments are not present, this command stops ongoing zoom movement.
(defaults to on)
ptz zoom
onvif ptz zoom --help
Operation for zoom.
Usage: onvif ptz zoom [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--zoom=<double> (mandatory) The speed for the zoom operation
ptz zoom-in
onvif ptz zoom-in --help
Operation for a single step zoom in operation.
Usage: onvif ptz zoom-in [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--step=<int> The amount of movement for the step.
ptz zoom-out
onvif ptz zoom-out --help
Operation for a single step zoom out operation.
Usage: onvif ptz zoom-out [arguments]
-h, --help Print this usage information.
-t, --profile-token=<token> (mandatory) The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
--step=<int> The amount of movement for the step.
recordings #
onvif recordings --help
Recordings commands.
Usage: onvif recordings <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
create-recording create-recording shall create a new recording.
create-recording-job create-recording-job shall create a new recording job.
delete-recording-job delete-recordings removes a recording job.
delete-recordings delete-recording shall delete a recording object.
get-recording-job-state get-recording-job-state returns the state of a recording job. It includes an aggregated state, and state for each track of the recording job.
get-recording-jobs get-recording-jobs shall return a description of all the recordings in the device.
get-recording-options get-recording-options returns information for a recording identified by the RecordingToken.
get-recordings get-recordings shall return a description of all the recordings in the device.
get-service-capabilities Returns the capabilities of the recording service. The result is returned in a typed answer.
set-recording-job-mode get-recording-job-mode shall change the mode of the recording job.
recordings create-recording
onvif recordings create-recording --help
create-recording shall create a new recording.
Usage: onvif recordings create-recording [arguments]
-h, --help Print this usage information.
--source-source-id=<string> (mandatory) Identifier for the source chosen by the client that creates the structure. This identifier is opaque to the device. Clients may use any type of URI for this field. A device shall support at least 128 characters.
--source-name=<string> (mandatory) Informative user readable name of the source, e.g. "Camera23". A device shall support at least 20 characters.
--source-location=<string> (mandatory) Informative description of the physical location of the source, e.g. the coordinates on a map.
--source-description=<string> (mandatory) Informative description of the source.
--source-address=<string> (mandatory) URI provided by the service supplying data to be recorded. A device shall support at least 128 characters.
--content=<string> (mandatory) Informative description of the source.
--maximum-retention-time=<duration> Specifies the maximum time that data in any track within the recording shall be stored. The device shall delete any data older than the maximum retention time. Such data shall not be accessible anymore. If the MaximumRetentionPeriod is set to 0, the device shall not limit the retention time of stored data, except by resource constraints. Whatever the value of MaximumRetentionTime, the device may automatically delete recordings to free up storage space for new recordings.
(defaults to "PT0S")
recordings create-recording-job
onvif recordings create-recording-job --help
create-recording-job shall create a new recording job.
Usage: onvif recordings create-recording-job [arguments]
-h, --help Print this usage information.
--job-configuration-schedule-token=<string> This attribute adds an additional requirement for activating the recording job. If this optional field is provided the job shall only record if the schedule exists and is active.
--job-configuration-recording-token=<string> (mandatory) Identifies the recording to which this job shall store the received data.
--job-configuration-mode=<string> The mode of the job. If it is idle, nothing shall happen. If it is active, the device shall try to obtain data from the receivers. A client shall use GetRecordingJobState to determine if data transfer is really taking place.
The only valid values for Mode shall be “Idle” and “Active”.
[Idle, Active]
--job-configuration-priority=<int> (mandatory) This shall be a non-negative number. If there are multiple recording jobs that store data to the same track, the device will only store the data for the recording job with the highest priority. The priority is specified per recording job, but the device shall determine the priority of each track individually. If there are two recording jobs with the same priority, the device shall record the data corresponding to the recording job that was activated the latest.
recordings delete-recording-job
onvif recordings delete-recording-job --help
delete-recording shall delete a recording object.
Usage: onvif recordings delete-recording-job [arguments]
-h, --help Print this usage information.
-t, --job-token=<token> (mandatory) The token of the job to be deleted.
recordings delete-recordings
onvif recordings delete-recordings --help
Option recording-token is mandatory.
Usage: onvif recordings delete-recordings [arguments]
-h, --help Print this usage information.
-t, --recording-token=<token> (mandatory) The reference of the recording to be deleted.
recordings get-recording-job-state
onvif recordings get-recording-job-state --help
get-recording-job-state returns the state of a recording job. It includes an aggregated state, and state for each track of the recording job.
Usage: onvif recordings get-recording-job-state [arguments]
-h, --help Print this usage information.
-t, --job-token=<token> (mandatory) The token of the job to be deleted.
recordings get-recording-jobs
onvif recordings get-recording-jobs --help
get-recording-jobs shall return a description of all the recordings in the device.
Usage: onvif recordings get-recording-jobs [arguments]
-h, --help Print this usage information.
recordings get-recording-options
onvif recordings get-recording-options --help
get-recording-options returns information for a recording identified by the RecordingToken.
Usage: onvif recordings get-recording-options [arguments]
-h, --help Print this usage information.
-t, --recording-token=<token> (mandatory) Token of the recording.
recordings get-recordings
onvif recordings get-recordings --help
get-recordings shall return a description of all the recordings in the device.
Usage: onvif recordings get-recordings [arguments]
-h, --help Print this usage information.
recordings get-service-capabilities
onvif recordings get-service-capabilities --help
Returns the capabilities of the recording service. The result is returned in a typed answer.
Usage: onvif recordings get-service-capabilities [arguments]
-h, --help Print this usage information.
recordings set-recording-job-mode
onvif recordings set-recording-job-mode --help
set-recording-job-mode shall change the mode of the recording job.
Usage: onvif recordings set-recording-job-mode [arguments]
-h, --help Print this usage information.
-t, --job-token=<token> (mandatory) Token of the recording job.
--mode=<string> (mandatory) The new mode for the recording job.
[Idle, Active]
replay #
onvif replay --help
Replay commands.
Usage: onvif replay <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-replay-configuration Returns the current configuration of the replay service.
get-replay-uri Requests a URI that can be used to initiate playback of a recorded stream using RTSP as the control protocol
get-service-capabilities Returns the capabilities of the replay service.
set-replay-configuration Returns the capabilities of the replay service.
replay get-replay-configuration
onvif replay get-replay-configuration --help
Returns the current configuration of the replay service.
Usage: onvif replay get-replay-configuration [arguments]
-h, --help Print this usage information.
replay get-replay-uri
onvif replay get-replay-uri --help
Requests a URI that can be used to initiate playback of a recorded stream using RTSP as the control protocol
Usage: onvif replay get-replay-uri [arguments]
-h, --help Print this usage information.
-t, --recording-token=<token> (mandatory) The identifier of the recording to be streamed.
--stream-setup-stream=<stream type> Defines if a multicast or unicast stream is requested
[RTP-Unicast (default), RTP-Multicast]
--stream-setup-transport-protocol=<transport protocol> Defines the network protocol for streaming, either UDP=RTP/UDP, RTSP=RTP/RTSP/TCP or HTTP=RTP/RTSP/HTTP/TCP
[UDP, TCP, RTSP (default), HTTP]
replay get-service-capabilities
onvif replay get-service-capabilities --help
Returns the capabilities of the replay service.
Usage: onvif replay get-service-capabilities [arguments]
-h, --help Print this usage information.
replay set-replay-configuration
onvif replay set-replay-configuration --help
Changes the current configuration of the replay service.
Usage: onvif replay set-replay-configuration [arguments]
-h, --help Print this usage information.
-t, --session-timeout=<string> The RTSP session timeout.
(defaults to "PT60S")
version #
onvif version --help
Display the package name and version.
Usage: onvif version [arguments]
-h, --help Print this usage information.