本文へスキップ

Remote Command RTSP Usage

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 I...

コピー/保存

このページはまだ日本語では利用できません。現在は英語版を表示しています。ブラウザの翻訳機能をご利用ください。

ブラウザで翻訳する
  • Chrome / Edge: アドレスバーの翻訳アイコン、またはページを右クリックして「日本語に翻訳」を選択してください。
  • Safari: アドレスバーの「aA」メニューから「翻訳」を選択してください。

翻訳メニューが表示されない場合は、ブラウザ設定で翻訳機能が有効になっているか確認してください。

英語版を見る

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
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://jp.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:

body='{
|        "authentication": {
|          "type": "basic",
|          "username": "admin",
|          "password": "password"
|        }
|      }'
soracom sims downlink-rtsp --sim-id <SIM_ID> --command snapshot --port 554 --body ${body} --coverage-type g
body='{
|        "authentication": {
|          "type": "basic",
|          "username": "admin",
|          "password": "password"
|        }
|      }'
soracom sims downlink-rtsp --sim-id <SIM_ID> --command snapshot --port 554 --body ${body} --coverage-type jp
検索 Escで閉じる / Enterで検索結果