tencent cloud

All product documents
DocumentationReal-time TeleoperationField Device SDKField Device Configuration Instructions
Field Device Configuration Instructions
Last updated: 2025-02-11 16:49:23
Field Device Configuration Instructions
Last updated: 2025-02-11 16:49:23

Sample JSON Configuration File

Filename: config.json File Location: $(workspace)/config.json File Type: json
Note: Remove comments after "//" when using. The minimum node is as follows { "device_id":"dev1", //Change to the device ID created in the console "device_name":"vin234", "device_streams":1, //If there are multiple inputs, change the number of streams here and increase the number of elements in the streams_config array "cloud_mode":"public", "certificate":"./device.pem", "projectid" : "xxxxx", //Change to the project ID created in the console "password": "xxxxx", //Change to the password created in the console "streams_config": [ { "fps":30, "bps":2000, "width":1920, "height":1080, "camera":0, //Change to the actual connected camera, corresponding to /dev/videox "protocol":"v4l2" //If inputting external yuv data, change to outside. If inputting external encoded stream data, change to outenc } ] }

Meaning of JSON Configuration Root Node

Node Name
Type
Meaning
Default value
Remarks
Parameter Range
device_id
String
Device ID, a unique code used for registering to the server
-
Required
-
device_name
String
Device name, used to identify device information
-
Required
-
force_login
Number
Whether to force login
0
Whether to remove previous device login for the same ID
0: When the same ID is already logged in, the current device login is removed
1: When the same ID is already logged in, the current device will force login, kicking out the previous device
server_ip
String
Signaling server IP
-
No need to specify for public cloud account, mandatory for privatization
-
server_port
Number
Signaling server port
-
No need to specify for public cloud account, mandatory for privatization
-
rtc_server_ip
String
Media server IP
-
No need to specify for public cloud account, mandatory for privatization
-
rtc_server_port
Number
Media server port number
-
No need to specify for public cloud account, mandatory for privatization
-
projectid
String
Project ID
-
Required for public cloud
-
cloud_mode
String
Cloud mode
"private"
Optional
public: Public cloud
private: Private cloud
password
String
device key
-
Required for public cloud
-
certificate
String
server public key certificate
-
Required for public cloud, device.pem file path
-
log_enable
Boolean
Log switch
0
Optional
0: disabled
1: info log
2: debug + info log
sdk_mode
String
Stream transmission mode
"server"
Optional
-
min_port
Number
Minimum local transmission port
50000
Optional
-
max_port
Number
Maximum local transmission port
50100
Optional
-
audio_enable
Number
Collect audio
0
Optional
0: Do not collect
1: Collect
audio_receive
Number
Receive audio
1
Optional
0: Do not receive
1: Receive
device_streams
Number
Number of device video streams
-
Required
1-8
streams_config
JSON Array
Stream configuration array
-
Required
The number is consistent with device_streams
network_bind
String Array
Specified NIC IP
-
Optional
Set when there is a specified NIC or multiple NIC requirements, "network_bind":["ip1","ip2"], configure the local IP of the specified communication NIC
output_path
String
Cloud File Storage path
"./"
Optional
Configure the output path for logs and temporary files during SDK runtime
log_file_num
Number
Number of stored log files
7
Optional
-
use_local_conf
Number
Use local configuration
0
Optional (private deployment only)
0: Use remote configuration
1: Use local configuration
use_local_license
Number
Use local license
0
Optional (private deployment only)
0: Use remote license
1: Use local license
fec_enable
Number
Enable FEC
0
Optional
0: Disable local FEC
1: Enable local FEC
up_fec_rate
Number
Specify uplink FEC redundancy
0
Optional
0: Automatic redundancy
>0: Specify redundancy percentage, up to 100
down_fec_rate
Number
Specify downlink FEC redundancy
0
Optional
0: Automatic redundancy
>0: Specify redundancy percentage, up to 100

Streams Config Meaning

Node Name
Type
Meaning
Default Value
Remarks
Parameter Range
fps
Number
Video Frame Rate
-
Required
-
bps
Number
Stream Transmission Bitrate
-
Required, configure according to image quality needs and actual network load. The higher the bitrate, the clearer the image quality, and the larger the data transmission.
-
min_bps
Number
Expected minimum transmission bitrate
Default value is the same as bps
Optional, fill in according to minimum image quality needs.

-
width
Number
Video source width
-
Required, for camera capture use camera resolution, for external input video, fill in according to input resolution
-
height
Number
Video source height
-
Required, for camera capture use camera resolution, for external input video, fill in according to input resolution
-
encode_width
Number
Encoded video width
Default is the same as width
Optional
-
encode_height
Number
Encoded video height
Default is the same as height
Optional
-
min_width
String
Minimum adjustable encoding resolution width
Same as encode_width
Optional
Set when dynamic resolution is enabled
min_fps
Number
Minimum fps
20
Optional
Set when adjusting dynamic frame rate
forece_min
Number
Enable forced minimum bitrate
0
Optional
0: Dynamically control the minimum bitrate
1: Set the expected minimum bitrate as the minimum bitrate
major
Number
Mainstream Configuration
0
Optional
0: No
1: Yes, high priority for mainstream
protocol
String
Collection Protocol
“v4l2”
Optional
"v4l2": Collect v4l2 camera data by SDK
"outenc": customers input encoded stream data through the API
"outside": customers input image data through the API
camera
Number
v4l2 camera number
0
Fill in the device /dev/videoX corresponding to number X, this field is effective when the protocol field is configured as "v4l2"
-
codec
Number
Encoding type
0
Optional
0:h264
1:h265
2:av1
encoder_type
Number
Video Codec Methods
1
Optional
0: software encoding preferred
1: hardware encoding preferred
frame_type
Number
yuyv-uyvy image reversal
0
Optional
0: no reversal
1: reversal
record_on
Number
Enable local storage
0
Optional
0: disabled
1: enabled
capture_acc
Number
Enable collection acceleration
0
Optional
0: disabled
1: enabled
need_mirror
Number
Enable mirror mode
0
Optional
0: disabled
1: enabled
always_push
Number
Enable forced push streaming
0
Optional
0: disabled
1: enabled

streams_config: Stream Configuration, protocol: Extension and Network Camera Collection Configuration

1. For pulling RTSP camera scenes, refer to the streams_config node configuration.
Reference configuration: ```json "streams_config": [ { "fps": 25, "bps": 2000, "width": 1920, "height": 1080, "protocol": "normal", "cameras": [ { "width": 1920, "height": 1080, "protocol": 1, "url": "rtsp://xxxxx" } ] } ] ```
2. Multi-screen stitching scenario reference streams_config node configuration
"streams_config": [
{
"fps":25,
"bps":2000,
"width":2560,
"height":1440,
"protocol":"combine",
"cameras": [
{
"width":640,
"height":480,
"camera":1,
"protocol":2,
"url":"/dev/video0"
},
{
"width":640,
"height":480,
"camera":1,
"protocol":2,
"url":"/dev/video1"
},
{
"width":640,
"height":480,
"camera":1,
"protocol":2,
"url":"/dev/video2"
},
{
"width":640,
"height":480,
"camera":1,
"protocol":2,
"url":"/dev/video3"
}
],
"combine_config": {
"basic_width":1920,
"basic_height":1080,
"pattern": [
{
"x1":0,
"y1":0,
"x2":640,
"y2":480
},
{
"x1":640,
"y1":0,
"x2":1280,
"y2":480
},
{
"x1":0,
"y1":480,
"x2":640,
"y2":960
},
{
"x1":640,
"y1":480,
"x2":1280,
"y2":960
}
]
}
}
]
Node Name
Type
Meaning
Default Value
Remarks
Parameter Range
protocol
String
Image Process type
"normal"
Default no processing
normal: normal transmission after decoding
rtsp_enc: pass-through encoded stream
combine: mixed stream stitching
cameras
JSON Array
video source camera
-
When multiple camera combinations are involved, multiple camera nodes need to be configured.
-
width
(in the cameras node)
Number
camera capture width
-
-
-
height
(in the cameras node)
Number
camera capture height
-
-
-
protocol
(in the cameras node)
Number

collection protocol type
1
-
1: rtsp collection
2: v4l2 mmap collection
3: v4l2 dma collection
url
(in the cameras node)
String

collection data source address
-
camera collection protocol type
protocol=1: network camera pull stream rtsp URL
protocol=2/3:/dev/videox




Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon