API / streamZ/MSP 325N / Streaming
Streaming Commands: Resulution/bitrate/orientation/streaming address/control
Applies to
streamZ, MSP 325N
1. Read the streaming resolution, currently selected resolution, supported streaming bitrates, currently selected bitrate, and currently selected orientation status
| Symbol | Size (Byte) | Definition | Remarks |
|---|---|---|---|
| CMD | 1 | 0XE1 | |
| DAT1 | 1 | 0X01 | |
| DAT2 | 1 | 0X00 | |
| DAT3 | 1 | Data block length (LSB) | |
| DAT4 | 1 | Data block length (MSB) |
Send command example
: {"language":1}b
Response command example: {"code":0,"data":{"bit":["Low(2Mbps)","Middle(4Mbps)","High(6Mbps)","Best(8Mbps)","Best(16Mbps)"],"bitrate_Select":2,"display":["Vertical Mode","Landscape Mode"],"display_mode_Select":0,"res":["1920x1080p30","1920x1080p60","1280x720p30","1280x720p60"],"res_Select":0,"language":0},"deviceUuid":"0122477JPRTA69000001","msg":"成功"}0
Response Data Block Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| bit | * | String[] | Bitrate |
| bitrate_Select | * | int | Bitrate selected index, starting from 0 |
| display | * | String[] | Orientation |
| display_mode_Select | * | int | Orientation selected index, starting from 0 |
| res | * | String[] | Resolution |
| res_Select | * | int | Resolution selected index, starting from 0 |
2. Write the streaming resolution, bitrate, and orientation settings
| Symbol | Size (Byte) | Definition | Remarks |
|---|---|---|---|
| CMD | 1 | 0XE0 | |
| DAT1 | 1 | 0X01 | |
| DAT2 | 1 | 0X00 | |
| DAT3 | 1 | Data block length (LSB) | |
| DAT4 | 1 | Data block length (MSB) |
Send command example
: {"bitrate_Select":3,"res_Select":1,"language":1,"display_mode_Select":1}a
Response command example: {"code":0,"deviceUuid":"0122477JPRTA69000001","msg":"成功"}e
Send Data Block Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| bit | * | String[] | Bitrate |
| bitrate_Select | * | int | Bitrate selected index, starting from 0 |
| display | * | String[] | Orientation |
| display_mode_Select | * | int | Orientation selected index, starting from 0 |
| res | * | String[] | Resolution |
| res_Select | * | int | Resolution selected index, starting from 0 |
3. Read the selected streaming address and the streaming list
| Symbol | Size (Byte) | Definition | Remarks |
|---|---|---|---|
| CMD | 1 | 0XE1 | |
| DAT1 | 1 | 0X01 | |
| DAT2 | 1 | 0X01 | |
| DAT3 | 1 | Data block length (LSB) | |
| DAT4 | 1 | Data block length (MSB) |
Send command example
: {"language":1}b
Response command example: {"code":0,"data":{"deviceData":[],"historyData":[{"defaultTaoRtmp":true,"language":0,"status":0,"url":"rtmp://push.tao1.info/live/TAOMINI66EE665312F29?txSecret\u003dbb7de8975e8f7db8a35a1f6475c0142a\u0026txTime\u003d66EFB7D3"}],"isBle":false,"pushStatus":false,"pushFileStatus":false,"language":0},"deviceUuid":"0122477JPRTA69000001","msg":"成功"}5
Response Data Block Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| deviceData | * | List | Device identification (delete works together with isBle) |
| historyData | * | List | Saves the history of whether push streaming is selected (can be deleted in any case)() |
| isBle | * | Boolean | Whether the device identification is Bluetooth. true: Bluetooth (device identification can be deleted), false: USB flash drive (device identification cannot be deleted) |
| pushStatus | * | Boolean | true: start streaming, false: stop streaming |
| pushFileStatu | * | Boolean | Playback file live status: true: live, false: not live |
| pushFileType | * | int | Playback file live type: 0 content live streaming, 1: slow live streaming |
| timeDuration | * | long | Streaming duration (in seconds) |
RtmpPreBean
| Parameter | Required | Type | Description |
|---|---|---|---|
| url | * | String | Streaming address |
| playFlv | * | String | Pull stream address flv |
| playM3u8 | * | String | Pull stream address m3u8 |
| status | * | int | 0: saved, 1: not saved |
| defaultTaoRtmp | * | boolean | true: the default address cannot be deleted or modified, false: it can be deleted or modified |
| enable | bool | Whether it is turned on | |
| desc | string | Streaming address description |
4. Start (stop) streaming
| Symbol | Size (Byte) | Definition | Remarks |
|---|---|---|---|
| CMD | 1 | 0XE0 | |
| DAT1 | 1 | 0X01 | |
| DAT2 | 1 | 0X05 | |
| DAT3 | 1 | Data block length (LSB) | |
| DAT4 | 1 | Data block length (MSB) |
Send command example
: {"ispush":true,"path":"xxxx.mp4","type":0, "mode":0,"language":1}1
Response command example: {"code":0,"deviceUuid":"0122477JPRTA69000001","msg":"成功"}e
Send Data Block Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| ispush | * | boolean | true: start streaming, false: stop streaming |
| path | string | Live streaming file name | |
| type | int | Streaming type: 0 local capture, 1 digital human file, 2 digital human list, 3 full digital human list, 4 slow live streaming | |
| mode | int | Playback mode: 0 single playback, 1 loop playback |