視訊編碼器板 TCP JSON 協定 RTSP API 指南

RTSP即時音視訊串流位址:

  • 格式: 即時傳輸協定://IP:埠/流編號
  • 預設連接埠: 554
  • 碼流ID: 0 (主流), 1 (次流)
  • 例如, 從設備位址檢索子流 192.168.1.188, 網址是:
  • 即時傳輸協定://192.168.1.1 8 8 :554 / 1

客戶 (行動應用程式) 透過TCP協議取得並設定相機參數;

相機充當 TCP 伺服器, 預設 TCP 連接埠是 8866.

TCP通訊資料格式:

純 JSON 字串

取得相機狀態:

資料結構:

              類型定義結構

              {

                     字元 s8DevId[64]; // 設備ID, defaults to IP if no ID is set.

                     u32 u32TfRecord; // Recording status of the TF card, 0: no recording; 1: recording in progress

              }JSON_DEV_STATUS_INFO_S;

Command characters:

              #define JS_CMD _ GET_DEV_STATUSGetDevStatus

Assuming the device’s IP address is 192.168.1.188, the client sends the following JSON data:

{

         ” GetDevStatus “: {       }

}

After the camera successfully received the data, it returned the following JSON data:

{

         ” GetDevStatus “: {

         ” s8DevId ” : ” 192.168.1.188 ” ,

         “ u32TfRecord ” : 0

         }

}

視訊編碼參數取得/設定:

資料結構:

              類型定義結構

              {

u8 u8VideoEncChn;        //0 : 主流; 1: 次流;

u8 u8VideoCodecType;    // 1:H264 ; 2:p265

u16 u16VideoWidth;              // Video width

u16 u16VideoHeight;       // Video height

u16 u8FrameRate;           // 幀率 (1-30)

u16 u8IframeInterval;      // 一世- frame interval size (1-100)

u8 u8BitrateControlMode; //Bitrate control mode: 0: 社區康復 1: VBR

u16 u16BitRateKps;         // Bitrate size

char s8VideoSizeName[256]; // List of supported resolutions }JSON_VIDEO_ENC_PARAM_S;

Command characters:

              Get parameters:

              #define JS_CMD_GET_VIDEO_ENC_PARAMgetVideoEncParam

              Setting parameters:

              #define JS_CMD_SET_VIDEO_ENC_PARAMsetVideoEncParam

例如:

用戶端檢索以下 JSON 數據,其中包含相機主碼流的編碼參數:

{

         ” getVideoEncParam “: {

         ” u8VideoEncChn “: 0

         }

}

相機回傳的JSON資料如下;

{

         ” getVideoEncParam “: {

         ” u8VideoEncChn “: 0,

         “ u8VideoCodecType ” : 1,

         “ u16VideoWidth ” : 3840,

       ” u16影片高度 ” : 1080,

       “u8幀率” : 30,

         ” u8Iframe間隔 ” : 60,

         ” u8位元速率控制模式 ” : 0,

         “ u16BitRateKps ” : 4096,

       ” s8影片大小名稱 ” : ” 3840×1080,1920×540 “

         }

}

客戶端將攝影機輔流影格率設定為 15 以及 JSON 格式的位元率 1024K, 如下:

{

         ” setVideoEncParam “: {

         ” u8VideoEncChn “: 1,

         ” u8幀率 “: 15,

         ” u16BitRateKps “: 1024

         }

}

設定成功後, 相機回傳 TRUE.

音訊編碼參數取得/設定:

資料結構:

              類型定義結構

              {

       u8 u8啟用;             //0: 禁用; 1: 使能夠;

       u32 u32ChnNum; // 1 : 單; 2: 立體聲

   u8 u8編碼類型; //6 : AAC; 8: G711A; 9: G711U;                        u32 u32取樣率; // 採樣率: 8000, 16000, 24000, 32000, 48000

       u8 u8Aout音量; // 體積大小: [0–100]                    }JSON_VIDEO_ENC_PARAM_S;

Command characters:

              Get parameters:

              #定義 JS_CMD_GET_AUDIO_PARAM “取得音訊參數”

              Setting parameters:

              #定義 JS_CMD_SET_AUDIO_PARAM “設定音訊參數”

例如:

客戶端檢索攝影機音訊編碼參數如下JSON數據:

{

         ” 取得音訊參數 “: { }

}

相機回傳的JSON資料如下;

{

         ” 取得音訊參數 “: {

         ” u8啟用 “: 1,

         “u32ChnNum” : 1,

         “ u8EncodeType ” : 8,

       “u32取樣率” : 8000,

       “ u8AoutVolume ” : 80,

                  }

}

客戶端設定攝影機音訊編碼為AAC, 立體聲, 取樣率為 48kHz. JSON資料如下:

{

         ” 設定音訊參數 “: {

         “u32ChnNum” : 2,

         “ u8EncodeType ” : 6,

       “u32取樣率” : 48000

                  }

}

設定成功後, 相機回傳 TRUE.

視訊影像參數取得/設定:

資料結構:

類型定義結構

{

u8 u8VideoIspChn;           //ISP通道; [0-4]

u8 u8亮度;              // 亮度: [0〜100]

u8 u8對比;                 // 對比度: [0〜100]

u8 u8色調;                        // 色度: [0〜100]

u8 u8飽和度;              // 飽和度: [0〜100]

u8 u8銳利度;                     // 清晰度: [0〜100]

}JSON_IMAGE_PARAM_S;

Command characters:

              Get parameters:

              #定義 JS_CMD_GET_IMAGE_PARAM “取得影像參數”

              Setting parameters:

              #定義 JS_CMD_SET_IMAGE_PARAM “設定影像參數”

例如:

用戶端檢索通道影像參數的以下 JSON 數據 0 相機的ISP:

{

         ” 取得影像參數 “: {

                   “ u8VideoIspChn ” : 0

         }

}

相機回傳的JSON資料如下;

{

         ” 取得影像參數 “: {

         ” u8VideoIspChn “: 0,

         “ u8亮度 ” : 50,

         “u8對比” : 50,

       “u8Hue” : 50,

       “u8飽和度” : 50,

         “ u8銳度 ” : 50

                  }

}

相機亮度的客戶端 JSON 資料設定為 53, 對比是 60, 飽和度是 56 如下:

{

         ” 設定影像參數 “: {

         “ u8VideoIspChn ” : 0,

         “ u8亮度 ” : 53,

       “u8對比” : 60,

       “u8飽和度” : 56

                  }

}

設定成功後, 相機回傳 TRUE.

TF卡資訊檢索;

資料結構:

類型定義結構

{

      u32 u32總大小;             // 總大小(MB)

      u32 u32已用大小;             // 使用容量單位 (MB)

      u32 u32可用大小;             // 可用容量(MB)

}JSON_SD_CARD_INFO_S;

Get parameters:

#定義 JS_CMD_GET_SD_CARD_INFO “取得SD卡訊息”

例如:

客戶端檢索以下有關相機 TF 卡資訊的 JSON 數據:

{

         ” 取得SD卡訊息 “: { }

}

相機回傳的JSON資料如下;

{

         ” 取得SD卡訊息 “: {

         ” u32總大小 “: 31254,

         “ u32UsedSize ” : 20000,

         ” u32可用大小 ” : 11254

                  }

}

TF卡錄音配置:

資料結構:

類型定義結構

{

       u8 u8自動記錄啟用;        //1: 啟用錄音; 0: 停用錄音

      u8 u8RecordStrChn;                // 錄音串流選擇: 0: 主流; 1: 次流

   u8 u8PreRecordSeconds;               // 預錄時間 [0-10] 幾秒鐘內

   u16 u16每個檔案記錄秒數; // 單一錄音檔案的時長 [10-1000] 秒

}JSON_RECORD_CONTROL_PARAM_S;

Get parameters:

#定義 JS_CMD_GET_RECORD_CONTROL_PARAM “取得記錄控制參數”

Setting parameters:

#定義 JS_CMD_SET_RECORD_CONTROL_PARAM “設定記錄控制參數”

例如:

用戶端擷取以下有關攝影機 TF 卡錄製配置的 JSON 數據:

{

         ” 取得記錄控制參數 “: { }

}

相機回傳的JSON資料如下;

{

         ” 取得記錄控制參數 “: {

                   ” u8自動錄音啟用 “: 1,

                   “ u8RecordStrChn ” : 0,

                   ” u8PrecordSeconds ” : 0,

              ” u16每個檔案記錄秒數 ” : 300

                  }

}

有線網路IP配置:

資料結構:

類型定義結構

{                                               

u8 u8Dhcp啟用;                  // 0: 靜態IP; 1: DHCP;

字元 s8IP[16];                          //IP地址

char s8子掩碼[16];              // 子網掩碼

char s8GateWay[16];              // 網關IP

字元 s8Dns[16];                //DNS位址

}JSON_NET_PARAM_S;

Get parameters:

#定義 JS_CMD_GET_NET_IP_PARAM “取得網路IP參數”

Setting parameters:

#定義 JS_CMD_SET_NET_IP_PARAM “設定網路IP參數”

例如:

客戶端使用JSON資料取得攝影機的IP資訊如下:

{

         ” 取得網路IP參數 “: { }

}

相機回傳的JSON資料如下;

{

         ” 取得網路IP參數 “: {

                   ” u8Dhcp啟用 “: 0,

                   ” s8IP ” : ” 192.168.1.188 ” ,

                   ” s8子掩碼 ” : ” 255.255.255.0 ” ,

              ” s8網關 ” : ” 192.168.1.1 ” ,

              ” s8Dns ” : ” 192.168.1.1 “

         }

}

用戶端設定攝影機的IP位址為 192.168.3.10, 網關作為 192.168.3.1, 和 DNS 作為 192.168.3.1. JSON資料如下:

{

         ” 設定網路IP參數 “: {

                   ” s8IP ” : ” 192.168.3.10 ” ,

              ” s8網關 ” : ” 192.168.3.1 ” ,

              ” s8Dns ” : ” 192.168.3.1 “

         }

}

設定成功後, 相機不回傳任何數據, 且客戶端需要使用新的IP位址重新連接到設備.

WiFi參數配置:

用戶端/應用程式檢索裝置找到的路由器的 SSID 列表.

                  {

                            “取得APSsid列表” :{ }

                  }

                  設備將返回 SSID 列表: 從清單中選擇要連線的路由 SSID.

                  將設備的 Wi-Fi 配置為在 STA 模式下運作:

         {

                  “設定WifiSsid參數”:{

                           “u8模式”: 0,

                           “s8Ss”: ” yrsx8888 “,

                            “s8密碼Wd”: “987545598400

                  }

    }

              設定設備Wi-Fi工作在熱點AP模式:

                  {

                            “設定WifiSsid參數”:{

                                    “u8模式”: 1

                            }

                  }

                  取得裝置的 Wi-Fi 狀態:

                  {

                            “取得WifiSsid參數” : { }

                  }

時間同步:

資料結構:    

                  類型定義結構

                  {

                            u8 u8時區;                        // 時區值 RT_TIMEZONE_E

                            char s8DateTime[64];              // 時間格式: “2019-06-12_12:56:59_3”    

                  }JSON_DATE_TIME_INFO_S;

                  時區值的定義:

類型定義枚舉

{

RT_TIMEZONE_InternationalDateLineWest = 0, /* UTC-12:00 */

RT_TIMEZONE_中途島薩摩亞 = 1, /* UTC-11:00 */

RT_TIMEZONE_夏威夷 = 2, /* UTC-10:00 */

RT_TIMEZONE_阿拉斯加 = 3, /* UTC-9:00 */

RT_TIMEZONE_TijuanaCalifornian = 4, /* UTC-8:00 */

RT_TIMEZONE_太平洋時間美國加拿大 = 5, /* UTC-8:00 */

RT_TIMEZONE_MountainTimeUS加拿大 = 6, /* UTC-7:00 */

RT_TIMEZONE_ChihuahuaLapazMazatlan = 7, /* UTC-7:00 */

RT_TIMEZONE_亞利桑那 = 8, /* UTC-7:00 */

RT_TIMEZONE_薩斯喀徹溫省 = 9, /* UTC-7:00 */

RT_TIMEZONE_Guaddlajara墨西哥城蒙特雷 = 10, /* UTC-6:00 */

RT_TIMEZONE_CentralTime美國加拿大 = 11, /* UTC-6:00 */

RT_TIMEZONE_CentralAmerica = 12, /* UTC-6:00 */

RT_TIMEZONE_BogotaLimaQuito = 13, /* UTC-5:00 */

RT_TIMEZONE_EasternTime美國加拿大 = 14, /* UTC-5:00 */

RT_TIMEZONE_印第安納東部 = 15, /* UTC-5:00 */

RT_TIMEZONE_加拉加斯 = 16, /* UTC-4:30 */

RT_TIMEZONE_大西洋時間加拿大 = 17, /* UTC-4:00 */

RT_TIMEZONE_GeorgetownLapazSanJuan = 18, /* UTC-4:00 */

RT_TIMEZONE_聖地牙哥 = 19, /* UTC-4:00 */

RT_TIMEZONE_NenfoundLand = 20, /* UTC-3:30 */

RT_TIMEZONE_巴西利亞 = 21, /* UTC-3:00 */

RT_TIMEZONE_布宜諾斯艾利斯喬治敦 = 22, /* UTC-3:00 */

RT_TIMEZONE_格陵蘭 = 23, /* UTC-3:00 */

RT_TIMEZONE_MidAtlantic = 24, /* UTC-2:00 */

RT_TIMEZONE_佛得角= 25, /* UTC-1:00 (維德角共和國) */

RT_TIMEZONE_亞速爾群島 = 26, /* UTC-1:00 (亞速爾群島) */

RT_TIMEZONE_格林威治平均時間都柏林愛丁堡里斯本倫敦 = 27, /* 世界標準時間-0:00 */

RT_TIMEZONE_卡薩布蘭卡 = 28, /* 世界標準時間-0:00 */

RT_TIMEZONE_蒙羅維亞 = 29, /* 世界標準時間-0:00 */

RT_TIMEZONE_阿姆斯特丹柏林伯爾尼羅馬斯德哥爾摩維也納 = 30, /* 世界標準時間+1:00 */

RT_TIMEZONE_貝爾格萊德布拉迪斯拉發布達佩斯盧布爾雅那布拉格 = 31, /* 世界標準時間+1:00 */

RT_TIMEZONE_布魯塞爾哥本哈根馬德里巴黎 = 32, /* 世界標準時間+1:00 */

RT_TIMEZONE_薩拉熱窩斯科普里華沙薩格勒布 = 33, /* 世界標準時間+1:00 */

RT_TIMEZONE_WestCentralAfrica = 34, /* 世界標準時間+1:00 */

RT_TIMEZONE_Rare比勒陀利亞 = 35, /* 世界標準時間+2:00 */

RT_TIMEZONE_赫爾辛基基輔裡加索非亞塔林維爾紐斯 = 36, /* 世界標準時間+2:00 */

RT_TIMEZONE_開羅 = 37, /* 世界標準時間+2:00 */

RT_TIMEZONE_明斯克 = 38, /* 世界標準時間+2:00 */

RT_TIMEZONE_Athens布加勒斯特伊斯坦堡 = 39, /* 世界標準時間+2:00 */

RT_TIMEZONE_耶路撒冷 = 40, /* 世界標準時間+2:00 */

RT_TIMEZONE_巴格達 = 41, /* 世界標準時間+3:00 */

RT_TIMEZONE_第比利斯 = 42, /* 世界標準時間+3:00 */

RT_TIMEZONE_Kuwait利雅得 = 43, /* 世界標準時間+3:00 */

RT_TIMEZONE_Moscow聖彼得堡伏爾加格勒 = 44, /* 世界標準時間+3:00 */

RT_TIMEZONE_內羅畢 = 45, /* 世界標準時間+3:00 */

RT_TIMEZONE_德黑蘭 = 46, /* 世界標準時間+3:30 */

RT_TIMEZONE_阿布達比馬斯喀特 = 47, /* 世界標準時間+4:00 */

RT_TIMEZONE_巴庫埃里溫 = 48, /* 世界標準時間+4:00 */

RT_TIMEZONE_喀布爾 = 49, /* 世界標準時間+4:30 */

RT_TIMEZONE_塔什幹 = 50, /* 世界標準時間+5:00 */

RT_TIMEZONE_葉卡捷琳堡 = 51, /* 世界標準時間+5:00 */

RT_TIMEZONE_Islamabad卡拉奇 = 52, /* 世界標準時間+5:00 */

RT_TIMEZONE_Chennai加爾各答孟買新德里 = 53, /* 世界標準時間+5:30 */

RT_TIMEZONE_加德滿都 = 54, /* 世界標準時間+5:45 */

RT_TIMEZONE_阿拉木圖新西伯利亞 = 55, /* 世界標準時間+6:00 */

RT_TIMEZONE_阿斯塔納達卡 = 56, /* 世界標準時間+6:00 */

RT_TIMEZONE_仰光 = 57, /* 世界標準時間+6:30 */

RT_TIMEZONE_克拉斯諾亞爾斯克 = 58, /* 世界標準時間+7:00 */

RT_TIMEZONE_曼谷河內雅加達 = 59, /* 世界標準時間+7:00 */

RT_TIMEZONE_BeijingChongqingHongKongUrumqi = 60, /* 世界標準時間+8:00 */

RT_TIMEZONE_KualaLumpur新加坡 = 61, /* 世界標準時間+8:00 */

RT_TIMEZONE_珀斯 = 62, /* 世界標準時間+8:00 */

RT_TIMEZONE_台北 = 63, /* 世界標準時間+8:00 */

RT_TIMEZONE_伊爾庫茨克UlaanBataar = 64, /* 世界標準時間+8:00 */

RT_TIMEZONE_大阪札幌東京 = 65, /* 世界標準時間+9:00 */

RT_TIMEZONE_首爾 = 66, /* 世界標準時間+9:00 */

RT_TIMEZONE_雅庫茨克 = 67, /* 世界標準時間+9:00 */

RT_TIMEZONE_阿德萊德 = 68, /* 世界標準時間+9:30 */

RT_TIMEZONE_布里斯班 = 69, /* 世界標準時間+10:00 */

RT_TIMEZONE_符拉迪沃斯托克 = 70, /* 世界標準時間+10:00 */

RT_TIMEZONE_關島莫爾茲比 = 71, /* 世界標準時間+10:00 */

RT_TIMEZONE_霍巴特 = 72, /* 世界標準時間+10:00 */

RT_TIMEZONE_坎培拉墨爾本雪梨 = 73, /* 世界標準時間+10:00 */

RT_TIMEZONE_MagadanSolomon新喀裡多尼亞 = 74, /* 世界標準時間+11:00 */

RT_TIMEZONE_奧克蘭威靈頓 = 75, /* 世界標準時間+12:00 */

RT_TIMEZONE_FijiKamchatkaMarshallIs = 76, /* 世界標準時間+12:00 */

RT_TIMEZONE_努庫阿洛法 = 77, /* 世界標準時間+13:00 */

RT_TIMEZONE_BUTT

}RT_TIMEZONE_E;

Get parameters:

#define JS_CMD_GET_DEV_DATE_TIMEGetDevDateTime

Setting parameters:

#define JS_CMD_SET_DEV_DATE_TIMEsetDevDateTime

Get the device time JSON data :

                  {

                            ” GetDevDateTime ” : {}

                  }

The device returns JSON data:

                  {

                            ” GetDevDateTime ” : {

                            “u8TimeZone” : 60,

                            “s8DateTime” : “2020-03-06_12:56:59_3”

                            }

                  }

The JSON data sets the device time to Thursday, 遊行 12, 2020, 在 3:38:30 下午:

                  {

                            ” setDevDateTime ” : {

                                     “s8DateTime” : “2020-03-12_15:38:30_4

                            }

                  }

The device returned TRUE upon successful setup.

設備管理:

JSON data for restarting the device:

                            {

                                     ” setSysControlParam ” : {

                                               “u8Restart” : 1               

                                     }

                            }

JSON data for restoring factory settings:

                            {

                                     ” setSysControlParam ” : {

                                               “u8ResetDefault” : 1              

                                     }

                            }

Formatting SD card JSON data:

                            {

                                     ” setSysControlParam ” : {

                                               “u8FormatSdCard” : 1                              

                                     }

                            }

雲台控制:

資料結構:

類型定義結構

{

       u8 u8Cmd;                        // Command code PTZ_CONTROL_CODE

u8 u8Speed;                     // 速度 (1-64)

u8 u8Data1;                            // 預訂的; this will be used for preset positions.

u8 u8Data2;                            // 預訂的, this will be used for special PTZ commands.

}JSON_PTZ_CONTROL_S;

enum PTZ_CONTROL_CODE

{

              PTZ_STOP = 0, // 停止

              PTZ_UP=1,          // 向上

              PTZ_DOWN=2,          // 向下

              PTZ_LEFT=3,              // 剩下

              PTZ_RIGHT=4,           // 對

              PTZ_LEFT_UP=5, // top left

              PTZ_LEFT_DOWN=6, // 左下角

              PTZ_RIGHT_UP=7, // top right

              PTZ_RIGHT_DOWN=8, // 8 : bottom right

              PTZ_ZOOM_IN=9, // 9 : Zoom in

              PTZ_ZOOM_OUT=10, // 10: ZOOM OUT=10, // 10 : ZOOM OUT=10

              PTZ_FOCUS_NEAR=11, // 11 : Focusing on near

              PTZ_FOCUS_FAR=12, // 12 : Focus on far

              PTZ_IRIS_ADD=13, // 13 : Aperture increase

              PTZ_IRIS_REDUCE=14, // 14 : Aperture reduced

              PTZ_GOTO_POINT = 15, // 15 : Call preset bit

              PTZ_CLEAR_POINT = 16, // 16 : Clear preset bit

              PTZ_PERSET_POINT = 17, // 17 : Set preset bit

              PTZ_AUTO_RUN = 18, // 18 : Horizontal auto-scan

};

雲台控制:

#define JS_CMD_PTZ_CONTROLPtzControlCmd

JSON commands controlled by Ptz:

  • Moving downwards at a speed of 30:

{

         ” PtzControlCmd “: {

         ” u8Cmd “: 2,

         ” u8Speed ” : 30

                  }

}

  • 1. Set preset position 2:

{

         ” PtzControlCmd “: {

         ” u8Cmd “: 17,

         “ u8Speed ” : 30,   

         “ u8Data1 ” : 2

                  }

}

TF卡文件搜尋:

( 1) Command to search for all video files within a specific time period on the same day:

{

                  “searchRecordFileList”:{

                            “u32Year”:2020, // 年

                            “u8Month”:7,                             // 月

                            “u8Day”:14,                       // 天

                            “u8StartHour”:0,              // Start time in hours

                            “u8StartMinute”:0,                   // Start time in minutes

                            “u8EndHour”:23,             // End time in hours

                            “u8EndMinute”:59,                  // End time in minutes

                            “u8EncChn”:0,                           // 0 是預設值.

                            “u8RecordTye”:0, // File type: 0: All files, 1: 預定的錄音; 2: Alarm recording; 3: Images;

                            “u32StartIdx”:0,               // The sequence number of the starting file

                            “u32ExpectedCount”: 10                 // Number of files returned by the request, currently the maximum value is 32.

                  }

}

Data returned by the device:

{

searchRecordFileList”: {

u32RecordFileTotalCount”: 7,                // Total number of files searched within this time period

stRecordFileList”: [        // Filename with path, file size]

“/dev/disk/0/part0/rec-pic/20200714/0/000_180149_0_0300_2.mp4”, 251649649, “/dev/disk/0/part0/rec-pic/20200714/0/001_180644_0_0169_256.mp4”, 144935215, “/dev/disk/0/part0/rec-pic/20200714/0/002_181001_0_0300_2.mp4”, 251650689, “/dev/disk/0/part0/rec-pic/20200714/0/003_181458_0_0300_2.mp4”, 251657016, “/dev/disk/0/part0/rec-pic/20200714/0/004_181958_0_0300_2.mp4”, 301449467, “/dev/disk/0/part0/rec-pic/20200714/0/005_182458_0_0000_256.mp4”, 37801991, “/dev/disk/0/part0/rec-pic/20200714/0/006_182642_0_0244_256.mp4”, 200069913

]

}

}

手動捕捉 JPG 影像:

              Send the following command to the device.

              {

                            “ManualSnapJpg”:{

                            }

                  }

Successfully returned:

                  {

                  “ManualSnapJpg”: true

                   }

PWM控制調節LED亮度:

Get the current PWM value:

{

getPwmParam”:{

          “u32PwmChn”: 0

}

}

Successfully returned:

{

getPwmParam”:{

          “u32PwmChn”:0,

          “u8啟用”:1,

          “u8DutyValue”:20

}

}

  • Set the PWM value:

{

setPwmParam”:{

          “u32PwmChn”: 0,

          “u8啟用”: 1,

          “u8DutyValue”: 60

}

}

Successfully returned:

{

setPwmParam”:true

}

注意 : u32PwmChn defaults to 0 and should not be changed arbitrarily. u8Enable has a value of 0/1, 哪裡 0 disables PWM output and 1 enables PWM output. u8DutyValue has a value range of 0-100.

17. OSD 文字取得/設定:

(1)   Obtain the specified video channel, OSD text parameters:

{“getVideoOsdTextInfo”:{

          “u8IspChn”:0,

          “u8TextIdx”:1

}}

Successfully returned:

{

getVideoOsdTextInfo”:{

          “u8IspChn”:0, // Video channel 0, fill in 0 for one camera

          “u8TextIdx”:1, // The number of the OSD text box, supporting multiple text boxes.

          “u8啟用”:0, // 使能夠, 0: do not display; 1: 展示

          “u16XRatioBase50000”:40000, // Relative coordinates of the horizontal position, with a maximum value of 50000.

          “u16YRatioBase50000”:1600, // Relative coordinates of the vertical position, with a maximum value of 50000.

          “u8FgTransparency”:10, // Foreground transparency [0-255]

          “u8BgTransparency”:255, // Background transparency value [0-255]

          “u8SizeType”:1, // Text size, 取值範圍 [0-3]

          “u32TextColor_BGRA8888”:4294967295, // Text color ARGB888 value

          “aszText”:”” // Text box displays the content string

}

}

(2)   Set the specified video channel, OSD text parameters:

{

setVideoOsdTextInfo”:{

          “u8IspChn”:0,

          “u8TextIdx”:1,

          “u8啟用”:1,

          “u16XRatioBase50000”:40000,

          “u16YRatioBase50000”:1600,

          “u8FgTransparency”:10,

          “u8BgTransparency”:255,

          “u8SizeType”:1,

          “u32TextColor_BGRA8888”:4294967295,

          “aszText”:”test 11111222233334444

}

}

Successfully returned:

{

setVideoOsdTextInfo”:true

}

價格範圍: $118.00 通過 $178.00
價格範圍: $98.00 通過 $158.00
原價是: $199.00.目前的價格是: $130.00.
價格範圍: $118.00 通過 $178.00

問一個問題

← 返回

感謝你的回應。 ✨