Skip to main content

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 TypeDisplayNet
Minimum Version3.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

SubcommandDescription
setSet options for a stream subsystem. See set options.
getReturn stream information for a specific device
listReturn information for all online stream encoder devices
factoryFactory-reset the stream encoder chipset
rebootReboot the stream encoder chipset
refreshRefresh the cached MCU device information

set options

stream set takes a subsystem type followed by option/value pairs:

TypeConfigures
mainThe encoder main stream
subThe encoder sub stream
encoderThe encoder itself (network, audio input, VLAN)
deviceOther MCU-controlled device options

main and sub stream options

OptionValuesDescription
enabletrue / falseEnables or disables the stream
encoderh264 / h265The encoder type
resolutionauto 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)
fps4 to 30Frame rate of the output stream
ratecontrolcbr / vbrConstant or variable bitrate
bitrate0 to 8 (main), 0 to 4 (sub)Bit rate preset. See the tables below
gop1 to 60Group of Pictures, the number of frames between keyframes
profileSee descriptionEncoding profile. H.264: baseline, main, or high; H.265: main only

Bit rate presets for the main stream:

ValueBitrateValueBitrate
01 Mbps510 Mbps
12 Mbps612 Mbps
24 Mbps716 Mbps
36 Mbps820 Mbps
48 Mbps

Bit rate presets for the sub stream:

ValueBitrate
0128 kbps
1256 kbps
2512 kbps
31 Mbps
42 Mbps

encoder options

OptionValuesDescription
networkdhcp or static <ip> <netmask> <gateway>The encoder's network configuration
audioinputhdmi / analogThe audio input source
vlan0 to 4094The VLAN tag for the encoder

device options

OptionValuesDescription
10gmanual copper, manual fiber, auto copper, auto fiber10 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.264
stream set transmitter1 main encoder h264
Configure the main stream in one command
stream set transmitter1 main enable true resolution 1920x1080 fps 30 bitrate 4
List every stream encoder device
stream list

Return value

stream list (and stream get) return the h26xstreams array; all other subcommands return a bare SUCCESS envelope.

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
}

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 typeDisplayNet API command
AddressPOST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands.
RoleUser
SubcommandOperationParameters
factorystream_factorydevice
getstream_getdevice
liststream_list
rebootstream_rebootdevice
refreshstream_refreshdevice
sendstream_senddevice commands
setstream_setdevice 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.

See also

  • thumb: thumbnail generation (uses the DN-300 encoder)
  • usb2: USB extender options on the same MCU