stream
DN-300 devices carry an H.264/H.265 encoder. The stream command configures it, along with DN-300 device options controlled by the onboard microcontroller (MCU).
| Command Type | DisplayNet |
| Minimum Version | 3.x.x |
Usage
stream set <target> <main | sub | encoder | device> [<option> <value>]...
stream get <target>
stream list
stream factory <target>
stream reboot <target>
stream refresh <target>
target is the device ID or device name of a single device.
Subcommands
| Subcommand | Description |
|---|---|
set | Set options for a stream subsystem. See set options. |
get | Return stream information for a specific device |
list | Return information for all online stream encoder devices |
factory | Factory-reset the stream encoder chipset |
reboot | Reboot the stream encoder chipset |
refresh | Refresh the cached MCU device information |
set options
stream set takes a subsystem type followed by option/value pairs:
| Type | Configures |
|---|---|
main | The encoder main stream |
sub | The encoder sub stream |
encoder | The encoder itself (network, audio input, VLAN) |
device | Other MCU-controlled device options |
main and sub stream options
| Option | Values | Description |
|---|---|---|
enable | true / false | Enables or disables the stream |
encoder | h264 / h265 | The encoder type |
resolution | auto or <width>x<height> | Output resolution. auto follows the source stream. For main: width 960 to 1920, height 540 to 1080 (max 1920x1080). For sub: width 320 to 960, height 180 to 540 (max 960x540) |
fps | 4 to 30 | Frame rate of the output stream |
ratecontrol | cbr / vbr | Constant or variable bitrate |
bitrate | 0 to 8 (main), 0 to 4 (sub) | Bit rate preset. See the tables below |
gop | 1 to 60 | Group of Pictures, the number of frames between keyframes |
profile | See description | Encoding profile. H.264: baseline, main, or high; H.265: main only |
Bit rate presets for the main stream:
| Value | Bitrate | Value | Bitrate |
|---|---|---|---|
0 | 1 Mbps | 5 | 10 Mbps |
1 | 2 Mbps | 6 | 12 Mbps |
2 | 4 Mbps | 7 | 16 Mbps |
3 | 6 Mbps | 8 | 20 Mbps |
4 | 8 Mbps |
Bit rate presets for the sub stream:
| Value | Bitrate |
|---|---|
0 | 128 kbps |
1 | 256 kbps |
2 | 512 kbps |
3 | 1 Mbps |
4 | 2 Mbps |
encoder options
| Option | Values | Description |
|---|---|---|
network | dhcp or static <ip> <netmask> <gateway> | The encoder's network configuration |
audioinput | hdmi / analog | The audio input source |
vlan | 0 to 4094 | The VLAN tag for the encoder |
device options
| Option | Values | Description |
|---|---|---|
10g | manual copper, manual fiber, auto copper, auto fiber | 10 Gbit port mode: manual forces the named port; auto selects automatically, favoring the named port when both are connected |
Examples
Switch a source's main stream to H.264stream set transmitter1 main encoder h264
Configure the main stream in one commandstream set transmitter1 main enable true resolution 1920x1080 fps 30 bitrate 4
List every stream encoder devicestream list
Return value
stream list (and stream get) return the h26xstreams array; all other subcommands return a bare SUCCESS envelope.
- stream list
- Other subcommands
stream list{
"status": "SUCCESS",
"request_id": null,
"result": {
"h26xstreams": [
{
"device_id": "6cdffb00387f",
"NetworkPortMode": "auto",
"NetworkPortPriority": "fiber",
"WorkMode": "dhcp",
"MCU": {
"Mode": "tx",
"NetworkEnabled": false,
"FirmwareVersion": "1.11.56",
"MacAddress": "6CDFFB00367D",
"IpAddress": "0.0.0.0"
},
"Encoder": {
"Enabled": true,
"AudioInput": "hdmi",
"WebServerEnabled": true,
"WebUiEnabled": false,
"FirmwareVersion": "1.12.11",
"MacAddress": "6CDFFB00367E",
"NetworkMode": "dhcp",
"IpAddress": "192.168.1.194",
"NetworkMask": "255.255.255.0",
"Gateway": "192.168.1.1",
"VlanEnabled": false,
"VlanTag": 0,
"MainStream": {
"Enabled": false,
"HDCPMode": "auto",
"AudioEnabled": true,
"StreamUrl": "rtsp://192.168.1.194/stream",
"EncoderType": "h264",
"Resolution": "auto",
"Fps": "30",
"RateControl": "cbr",
"BitRate": "2",
"Gop": "30",
"Profile": "main"
},
"SubStream": {
"Enabled": false,
"HDCPMode": "force",
"AudioEnabled": true,
"StreamUrl": "rtsp://192.168.1.194/thumb",
"EncoderType": "h264",
"Resolution": "480_270",
"Fps": "30",
"RateControl": "cbr",
"BitRate": "3",
"Gop": "30",
"Profile": "baseline"
},
"Thumbnail": {
"HDCPMode": "force",
"Url": "http://192.168.1.194/snap.jpg"
}
},
"OSD": {
"Enabled": false,
"Id": null
},
"USB": {
"SUIEnabled": true,
"MSAEnabled": false,
"PendingReset": false,
"HubConnection": "off"
},
"DebugInfo": {
"EncoderFirmwareProgress": null,
"EncoderResetInProgress": false,
"EncoderRebootInProgress": false,
"EncoderFirmwareUpdateInProgress": false,
"EncoderFirmwareUpdaterReady": false,
"McuRebootInProgress": false,
"McuFirmwareUpdateInProgress": false
},
"ThumbnailEnabled": false
}
]
},
"error": null
}
{
"status": "SUCCESS",
"request_id": null,
"result": null,
"error": null
}
Notifications
Whenever a stream changes, a DN_NOTIFICATION with a streams_update result is sent to all valid clients. Each entry has the same structure as the h26xstreams entries in the stream list return above.
REST API
| Endpoint type | DisplayNet API command |
|---|---|
| Address | POST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands. |
| Role | User |
| Subcommand | Operation | Parameters |
|---|---|---|
factory | stream_factory | device |
get | stream_get | device |
list | stream_list | — |
reboot | stream_reboot | device |
refresh | stream_refresh | device |
send | stream_send | device commands |
set | stream_set | device type [settings]* |
A parameter in brackets is optional. A parameter marked * takes the remainder of the command line as one string. Pass the text exactly as you would type it on the TCI interface.