az iot ops ns asset media stream
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.67.0 or higher). The extension will automatically install the first time you run an az iot ops ns asset media stream command. Learn more about extensions.
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage streams for media namespaced assets in an IoT Operations instance.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az iot ops ns asset media stream add |
Add a stream to a media asset. |
Extension | Preview |
| az iot ops ns asset media stream list |
List streams in a media asset. |
Extension | Preview |
| az iot ops ns asset media stream remove |
Remove a stream from a media asset. |
Extension | Preview |
| az iot ops ns asset media stream show |
Show details of a stream in a media asset. |
Extension | Preview |
| az iot ops ns asset media stream update |
Update a stream in a media asset. |
Extension | Preview |
az iot ops ns asset media stream add
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a stream to a media asset.
az iot ops ns asset media stream add --asset
--instance
--name
--resource-group
[--da --disable-autostart {false, true}]
[--dest --destination]
[--duration]
[--format --task-format {avi, bmp, flv, jpeg, jpg, mjpeg, mkv, mp4, mpeg, mpg, mts, png, tif, tiff, webm}]
[--media-server-address --ms-addr]
[--media-server-cert --ms-cert]
[--media-server-pass --ms-pass]
[--media-server-path --ms-path]
[--media-server-port --ms-port]
[--media-server-user --ms-user]
[--path]
[--replace {false, true}]
[--snapshots-per-sec --sps]
[--task-type {clip-to-fs, snapshot-to-fs, snapshot-to-mqtt, stream-to-rtsp, stream-to-rtsps}]
Examples
Add a snapshot-to-mqtt stream with default settings.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream --task-type snapshot-to-mqtt
Add a snapshot-to-mqtt stream with custom format and rate.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream --task-type snapshot-to-mqtt --format png --snapshots-per-sec 2 --disable-autostart
Add a snapshot-to-fs stream for saving images to file system.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name fileSnapshotStream --task-type snapshot-to-fs --format jpeg --path /media/snapshots --snapshots-per-sec 1
Add a clip-to-fs stream for recording video clips.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name clipStream --task-type clip-to-fs --format mp4 --duration 30 --path /media/clips
Add a stream-to-rtsp stream for real-time streaming.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name rtspStream --task-type stream-to-rtsp --media-server-address 192.168.1.100 --media-server-port 554 --media-server-path /live/stream1 --media-server-user streamuser --media-server-pass streampass
Add a secure stream-to-rtsps stream with certificate.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name secureRtspStream --task-type stream-to-rtsps --media-server-address secure.example.com --media-server-port 322 --media-server-path /secure/stream --media-server-cert /path/to/cert.pem
Add a media stream with a MQTT destination.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name streamWithDest --task-type snapshot-to-mqtt --format jpeg --destination topic=/media/snapshots retain=Keep qos=Qos1 ttl=3600
Replace an existing media stream with new configuration.
az iot ops ns asset media stream add --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream --task-type snapshot-to-mqtt --format bmp --snapshots-per-sec 5 --replace
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Stream name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Disable stream autostart.
| Property | Value |
|---|---|
| Accepted values: | false, true |
Key=value pairs representing the destination for streams. Allowed arguments include: path for Storage; or topic, retain, qos, and ttl for MQTT. Allowed values for retain are Never and Keep and allowed values for qos are Qos0 and Qos1.
Duration of clip in seconds. Only allowed for clip-to-fs. Minimum: 0.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
Media format. Only allowed for snapshot-to-mqtt, snapshot-to-fs, clip-to-fs. For snapshots, only png, bmp, jpg, jpeg, tif, tiff are allowed. For clips, only avi, mp4, mkv, mts, mjpeg, mpg, mpeg, flv, webm are allowed.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
| Accepted values: | avi, bmp, flv, jpeg, jpg, mjpeg, mkv, mp4, mpeg, mpg, mts, png, tif, tiff, webm |
Media server address for streaming. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server certificate reference. Only allowed for stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server password reference. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server path for streaming. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server port for streaming. Only allowed for stream-to-rtsp and stream-to-rtsps. Minimum: 1.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server username reference. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
File system path for snapshots or clips. Only allowed for snapshot-to-fs and clip-to-fs.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
Replace the stream if another stream with the same name is already present.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Number of snapshots per second. Only allowed for snapshot-to-mqtt and snapshot-to-fs. Minimum: 0.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
Media task type.
| Property | Value |
|---|---|
| Accepted values: | clip-to-fs, snapshot-to-fs, snapshot-to-mqtt, stream-to-rtsp, stream-to-rtsps |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset media stream list
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List streams in a media asset.
az iot ops ns asset media stream list --asset
--instance
--resource-group
Examples
List all streams in a media asset.
az iot ops ns asset media stream list --asset mymediaasset --instance myInstance -g myInstanceResourceGroup
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset media stream remove
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Remove a stream from a media asset.
az iot ops ns asset media stream remove --asset
--instance
--name
--resource-group
Examples
Remove a stream from a media asset.
az iot ops ns asset media stream remove --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Stream name.
The resource group of the Azure IoT Operations instance.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset media stream show
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show details of a stream in a media asset.
az iot ops ns asset media stream show --asset
--instance
--name
--resource-group
Examples
Show details of a specific media stream.
az iot ops ns asset media stream show --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Stream name.
The resource group of the Azure IoT Operations instance.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset media stream update
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a stream in a media asset.
az iot ops ns asset media stream update --asset
--instance
--name
--resource-group
[--da --disable-autostart {false, true}]
[--dest --destination]
[--duration]
[--format --task-format {avi, bmp, flv, jpeg, jpg, mjpeg, mkv, mp4, mpeg, mpg, mts, png, tif, tiff, webm}]
[--media-server-address --ms-addr]
[--media-server-cert --ms-cert]
[--media-server-pass --ms-pass]
[--media-server-path --ms-path]
[--media-server-port --ms-port]
[--media-server-user --ms-user]
[--path]
[--snapshots-per-sec --sps]
[--task-type {clip-to-fs, snapshot-to-fs, snapshot-to-mqtt, stream-to-rtsp, stream-to-rtsps}]
Examples
Update the format and rate of a snapshot stream.
az iot ops ns asset media stream update --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream --format png --snapshots-per-sec 3
Update the path for a file-based stream.
az iot ops ns asset media stream update --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name fileStream --path /updated/media/path
Update server configuration for an RTSP stream.
az iot ops ns asset media stream update --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name rtspStream --media-server-address 192.168.1.200 --media-server-port 8554
Update destinations for a media stream and disable autostart.
az iot ops ns asset media stream update --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name snapshotStream --destination path=/new/snapshot/path --disable-autostart
Update clip duration and format.
az iot ops ns asset media stream update --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name clipStream --duration 60 --format avi
Update secure RTSP stream credentials.
az iot ops ns asset media stream update --asset mymediaasset --instance myInstance -g myInstanceResourceGroup --name secureStream --media-server-cert /new/path/to/cert.pem
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Stream name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Disable stream autostart.
| Property | Value |
|---|---|
| Accepted values: | false, true |
Key=value pairs representing the destination for streams. Allowed arguments include: path for Storage; or topic, retain, qos, and ttl for MQTT. Allowed values for retain are Never and Keep and allowed values for qos are Qos0 and Qos1.
Duration of clip in seconds. Only allowed for clip-to-fs. Minimum: 0.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
Media format. Only allowed for snapshot-to-mqtt, snapshot-to-fs, clip-to-fs. For snapshots, only png, bmp, jpg, jpeg, tif, tiff are allowed. For clips, only avi, mp4, mkv, mts, mjpeg, mpg, mpeg, flv, webm are allowed.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
| Accepted values: | avi, bmp, flv, jpeg, jpg, mjpeg, mkv, mp4, mpeg, mpg, mts, png, tif, tiff, webm |
Media server address for streaming. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server certificate reference. Only allowed for stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server password reference. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server path for streaming. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server port for streaming. Only allowed for stream-to-rtsp and stream-to-rtsps. Minimum: 1.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
Media server username reference. Only allowed for stream-to-rtsp and stream-to-rtsps.
| Property | Value |
|---|---|
| Parameter group: | Stream to RTSP and RTSPS Configuration Arguments |
File system path for snapshots or clips. Only allowed for snapshot-to-fs and clip-to-fs.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
Number of snapshots per second. Only allowed for snapshot-to-mqtt and snapshot-to-fs. Minimum: 0.
| Property | Value |
|---|---|
| Parameter group: | Snapshot and Clip Configuration Arguments |
Media task type.
| Property | Value |
|---|---|
| Accepted values: | clip-to-fs, snapshot-to-fs, snapshot-to-mqtt, stream-to-rtsp, stream-to-rtsps |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |