Soracom Remote Command
Capturing Snapshots from RTSP Streams
With the Soracom API’s Remote Command feature, you can send RTSP commands to capture snapshots from IP cameras and video streaming devices that use an IoT SIM.
RTSP Remote Command currently supports the snapshot command, which captures still images from video streams. The response includes the captured image as JPEG binary data.
Ensure your device's RTSP server is configured and accessible before using this feature. The device must support H.264 video encoding.
Supported Features
- Authentication: None or Basic authentication
- Video Encoding: H.264
- Commands:
snapshot
- Captures a still image from the RTSP stream - Default Port: 554 (customizable)
- Response Format: JPEG image binary data (Content-Type: image/jpeg)
Programmatic Usage
Soracom API
To access the Soracom API, first use the auth API to obtain an API Key and Token. Refer to the API Usage Guide for instructions on how to use the API Key and Token in API requests.
Then, use the sendDownlinkRtsp API to send an RTSP command to a device that has an IoT SIM:
curl -X POST \
| -H 'X-Soracom-API-Key: <MY-API-KEY>' \
| -H 'X-Soracom-Token: <MY-TOKEN>' \
| -H 'Content-Type: application/json' \
| -d '{
| "command": "snapshot",
| "port": 554,
| "authentication": {
| "type": "basic",
| "username": "admin",
| "password": "password"
| }
| }' \
| https://g.api.soracom.io/v1/sims/<SIM_ID>/downlink/rtsp
Soracom CLI
To use the Soracom CLI, you must first configure it to authenticate with your account information, authorization key, or SAM user credentials.
Run the following command to capture a snapshot from an RTSP stream on a device that has an IoT SIM: