You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> If you don't enable preview features, you see the following error message in the `aio-supervisor-...` pod logs when you try to use the media or ONVIF connectors: `No connector configuration present for AssetEndpointProfile: <AssetEndpointProfileName>`.
42
-
43
40
## Create a device
44
41
45
42
To configure the media connector, first create a device that defines the connection to the media source. The device includes the URL of the media source and any credentials you need to access the media source:
46
43
44
+
# [Operations experience](#tab/portal)
45
+
47
46
1. In the operations experience web UI, select **Devices** in the left navigation pane. Then select **Create new**.
48
47
49
48
1. Enter a name for your device, such as `media-connector`. To add the endpoint for the media connector, select **New** on the **Microsoft.Media** tile.
@@ -64,9 +63,25 @@ To configure the media connector, first create a device that defines the connect
64
63
65
64
:::image type="content" source="media/howto-use-media-connector/media-connector-device-created.png" alt-text="Screenshot that shows the list of devices." lightbox="media/howto-use-media-connector/media-connector-device-created.png":::
66
65
66
+
# [Azure CLI](#tab/cli)
67
+
68
+
Run the following commands:
69
+
70
+
```azurecli
71
+
az iot ops ns device create -n media-connector-cli -g {your resource group name} --instance {your instance name}
72
+
73
+
az iot ops ns device endpoint inbound add media --device media-connector-cli -g {your resource group name} -i {your instance name} --name media-connector-cli-0 --endpoint-address "rtsp://samplecamera:554/stream1"
74
+
```
75
+
76
+
To learn more, see [az iot ops ns device](/cli/azure/iot/ops/ns/device).
77
+
78
+
---
79
+
67
80
## Create an asset to publish an image snapshot
68
81
69
-
To define a namespace asset that publishes an image snapshot from the media source, follow these steps:
82
+
To define a namespace asset that publishes an image snapshot from the media source to the MQTT broker:
83
+
84
+
# [Operations experience](#tab/portal)
70
85
71
86
1. In the operations experience web UI, select **Assets** in the left navigation pane. Then select **Create namespace asset**.
72
87
@@ -78,7 +93,7 @@ To define a namespace asset that publishes an image snapshot from the media sour
78
93
79
94
1. On the **Streams** page, select **Add stream** to add a stream for the asset.
80
95
81
-
1. Add a name for the stream, such as `mysnapshots`. Set MQTT as the destination and add a name for the MQTT topic to publish to such as `mysnapshots`. Select `mqtt-to-snapshot` as the task type.
96
+
1. Add a name for the stream, such as `mysnapshots`. Set MQTT as the destination and add a name for the MQTT topic to publish to such as `mysnapshots`. Select `snapshot-to-mqtt` as the task type.
82
97
83
98
:::image type="content" source="media/howto-use-media-connector/add-snapshot-stream.png" alt-text="Screenshot that shows how to add a snapshot stream." lightbox="media/howto-use-media-connector/add-snapshot-stream.png":::
84
99
@@ -88,10 +103,24 @@ To define a namespace asset that publishes an image snapshot from the media sour
88
103
89
104
1. On the **Review** page, review the details of the asset and select **Create** to create the asset.
To learn more, see [az iot ops ns asset rest](/cli/azure/iot/ops/ns/asset/rest).
115
+
116
+
---
117
+
91
118
## Add a stream to save a video clip
92
119
93
120
In this section, you add a stream to the asset that saves video clips from the media source to the file system.
94
121
122
+
# [Operations experience](#tab/portal)
123
+
95
124
1. In the operations experience web UI, select **Assets** in the left navigation pane. Then select the `my-media-source` asset you created in the previous section.
96
125
97
126
1. Select **Streams** and then select **Add stream** to add a stream to the asset.
@@ -105,3 +134,13 @@ In this section, you add a stream to the asset that saves video clips from the m
105
134
1. The new stream is listed in the asset's **Streams** page:
106
135
107
136
:::image type="content" source="media/howto-use-media-connector/media-connector-streams.png" alt-text="Screenshot that shows the list of streams for the media connector asset." lightbox="media/howto-use-media-connector/media-connector-streams.png":::
137
+
138
+
# [Azure CLI](#tab/cli)
139
+
140
+
Run the following command:
141
+
142
+
```azurecli
143
+
az iot ops ns asset media stream add --asset mymediaasset --instance {your instance name} -g {your resource group name} --name clipStream --task-type clip-to-fs --format mp4 --duration 30 --path /data/clips
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/overview-media-connector.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,18 @@ The media connector can connect to various sources, including:
26
26
| Media file |`http://camera1/snapshot/profile1`<br/>`nfs://server/path/file.extension`<br/>` file://localhost/media/path/file.mkv`| Any media file with a URL accessible from the cluster. |
27
27
| Media folder |`file://host/path/to/folder/`<br/>`ftp://server/path/to/folder/`| A folder, accessible from the cluster, that contains media files such as snapshots or clips. |
28
28
29
+
## Task types
30
+
31
+
The media connector supports the following task types:
32
+
33
+
| Task type | Description |
34
+
|-----------|-------------|
35
+
| snapshot-to-mqtt | Captures a snapshot from a media source and publishes it to an MQTT topic. |
36
+
| clip-to-fs | Saves a video clip from a media source to the file system. |
37
+
| snapshot-to-fs | Saves a snapshot from a media source to the file system. |
38
+
| stream-to-rtsp | Proxies a live video stream from a media source to an RTSP endpoint. |
39
+
| stream-to-rtsps | Proxies a live video stream from a media source to an RTSPs endpoint. |
0 commit comments