首页 / 文档中心 / 设备接口文档 / 通道配置信息获取

通道配置信息获取

设备接口文档 · 新版接口

简要描述:

  • 通道配置信息

请求URL:
- /xsw/getConfig

请求方式:
- POST,GET

参数:

参数名 必选 类型 说明
- - - -

返回示例

{
    "encode": [
        {
            "valid_ch": {"valid_ch": 10}, // 首页 通道数
            "aenc_param": [
                {
                    "aenc_bitrate": 131072,
                    "aenc_code": 0,
                    "aenc_input": 0,
                    "aenc_samplerate": 48000,
                    "analog_vol": 30,
                    "rtsp_g711": 0
                },
                {
                    "aenc_bitrate": 131072,
                    "aenc_code": 0,
                    "aenc_input": 1,
                    "aenc_samplerate": 48000,
                    "analog_vol": 30,
                    "rtsp_g711": 0
                },
                {
                    "aenc_bitrate": 131072,
                    "aenc_code": 0,
                    "aenc_input": 0,
                    "aenc_samplerate": 48000,
                    "analog_vol": 30,
                    "rtsp_g711": 0
                }
            ],
            "udp_src_ip": {
                "udp_src_ip": "127.0.0.1"
            },
            "udp_src_port": {
                "udp_src_port": 1024
            },
            "valid_ch": {
                "valid_ch": 3 // 通道数量
            },
            "venc_param": [ // 数组0位代表通道1
                {
                    "audioEnable": 1,
                    "audio_always_fetch_by_url": 1,   
                    "audio_source_url": "http:\/\/audiosource",
                    "compact_mode": 0,
                    "forceAudioTranscode": 0,
                    "forceResample": 0,
                    "live_cloud_enable": 0,
                    "live_cloud_url": "rtmp:\/\/cloud.xstrive.com:19351\/live\/stream0",
                    "live_enable": 0,                                                // HLS开关,0关闭,1开启
                    "live_inner_enable": 1,
                    "live_inner_url": "rtmp:\/\/127.0.0.1:1935\/hlsram\/live0",
                    "live_local_url": "rtmp:\/\/127.0.0.1:1935\/hlsram\/live0",
                    "lowdelay": 1,
                    "multicast_bitrate": 7000000,
                    "multicast_enable": 0,
                    "multicast_ip": "234.5.6.7",
                    "multicast_port": 110,
                    "osd": [
                        {
                            "alpha": 128,
                            "bcolor": 0,
                            "bgalpha": 50,
                            "enable": 0,
                            "font_color": 16777215,
                            "font_size": 48,
                            "osd_type": 3,
                            "speed": 50,
                            "txt": "osd",
                            "x": 20,
                            "y": 20
                        }
                    ],
                    "recordEnable": 1,                                            // 录像开关,0关闭,1开启
                    "rotate": 0,
                    "rtmp2_enable": 0,
                    "rtmp2_url": "rtmp:\/\/127.0.0.1\/live\/stream0",
                    "rtmp_enable": 0,                                             // RTMP推流开关,0关闭,1开启
                    "rtmp_publish_enable_write": 1,
                    "rtmp_publish_stop_port": 80,
                    "rtmp_publish_uri": "rtmp:\/\/192.168.0.15\/live\/live0",     // RTMP推流地址
                    "rtsp_enable": 0,                                             // 通道开关,0关闭,1开启
                    "rtsp_overtcp": 0,
                    "rtsp_password": "admin",
                    "rtsp_uri": "rtsp:\/\/admin:admin@192.168.0.49\/live\/chn=0", // 视频源地址
                    "rtsp_username": "admin",
                    "sleep_gap": 9,
                    "snap_enable": 1,
                    "snap_interval": 200,
                    "snap_upload_enable": 1,
                    "snap_upload_url": "http:\/\/192.168.0.194\/api\/uploadFile",
                    "srt_enable": 0,
                    "srt_url": "srt:\/\/192.168.0.10:8004\/",
                    "transcodeEnable": 0,
                    "ts_pid": 0,
                    "vencHeight": 480,
                    "vencMaxHeight": 4320,
                    "vencMaxWidth": 7680,
                    "vencWidth": 640,
                    "venc_bitrate": 1024,
                    "venc_codec": 0,
                    "venc_fps": 30,
                    "venc_gop": 50,
                    "venc_profile": 0,
                    "venc_rc_mode": 1,
                    "venc_rotate": 0,
                    "verticalEnable": 1,
                    "video_carousel_enabled": 0,
                    "webrtcEnable": 0,
                    "webrtcPushType": 3
                },
                {
                    "audioEnable": 1,
                    "audio_always_fetch_by_url": 1,
                    "audio_carousel_enabled": 0,
                    "audio_source_url": "http:\/\/audiosource",
                    "compact_mode": 0,
                    "forceAudioTranscode": 0,
                    "forceResample": 0,
                    "http_flv_enable": 0,
                    "http_flv_uri": "http:\/\/192.168.0.69:554\/cam\/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
                    "http_hls_enable": 0,
                    "http_hls_uri": "rtsp:\/\/192.168.0.69:554\/cam\/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif.m3u8",
                    "http_ts_enable": 0,
                    "http_ts_uri": "rtsp:\/\/192.168.0.69:554\/cam\/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif.ts",
                    "live_cloud_enable": 0,
                    "live_cloud_url": "rtmp:\/\/cloud.xstrive.com:19351\/live\/stream1",
                    "live_enable": 0,
                    "live_inner_enable": 1,
                    "live_inner_url": "rtmp:\/\/127.0.0.1:1935\/hlsram\/live1",
                    "live_local_url": "rtmp:\/\/127.0.0.1:1935\/hlsram\/live1",
                    "lowdelay": 1,
                    "multicast_bitrate": 7000000,
                    "multicast_enable": 0,
                    "multicast_ip": "234.5.6.7",
                    "multicast_port": 111,
                    "osd": [
                        {
                            "alpha": 128,
                            "bcolor": 0,
                            "bgalpha": 50,
                            "enable": 0,
                            "font_color": 16777215,
                            "font_size": 48,
                            "osd_type": 3,
                            "speed": 50,
                            "txt": "osd",
                            "x": 20,
                            "y": 20
                        }
                    ],
                    "recordEnable": 1,
                    "rotate": 0,
                    "rtmp2_enable": 0,
                    "rtmp2_url": "rtmp:\/\/127.0.0.1\/live\/stream1",
                    "rtmp_enable": 0,
                    "rtmp_publish_enable_write": 1,
                    "rtmp_publish_stop_port": 80,
                    "rtmp_publish_uri": "rtmp:\/\/192.168.0.15\/live\/live1",
                    "rtsp_enable": 1,
                    "rtsp_overtcp": 0,
                    "rtsp_password": "1234abcd",
                    "rtsp_uri": "rtsp:\/\/admin:1234abcd@192.168.0.64\/Streaming\/Channels\/101?transportmode=unicast&profile=Profile_1",
                    "rtsp_username": "admin",
                    "sleep_gap": 9,
                    "snap_enable": 0,
                    "snap_interval": 200,
                    "snap_upload_enable": 0,
                    "snap_upload_url": "http:\/\/192.168.0.61\/upload",
                    "srt_enable": 0,
                    "srt_url": "srt:\/\/192.168.0.10:8004\/",
                    "transcodeEnable": 0,
                    "ts_pid": 0,
                    "vencHeight": 480,
                    "vencMaxHeight": 480,
                    "vencMaxWidth": 640,
                    "vencWidth": 640,
                    "venc_bitrate": 1024,
                    "venc_codec": 0,
                    "venc_fps": 30,
                    "venc_gop": 50,
                    "venc_profile": 0,
                    "venc_rc_mode": 1,
                    "venc_rotate": 0,
                    "verticalEnable": 1,
                    "video_carousel_enabled": 0,
                    "webrtcEnable": 0,
                    "webrtcPushType": 0
                },
                {
                    "audioEnable": 1,
                    "audio_always_fetch_by_url": 1,
                    "audio_carousel_enabled": 0,
                    "audio_source_url": "\/media\/vod\/黄安-样样红.mp3",
                    "compact_mode": 0,
                    "forceAudioTranscode": 0,
                    "forceResample": 0,
                    "http_flv_enable": 0,
                    "http_flv_uri": "http:\/\/192.168.0.69:554\/cam\/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
                    "http_hls_enable": 0,
                    "http_hls_uri": "rtsp:\/\/192.168.0.69:554\/cam\/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif.m3u8",
                    "http_ts_enable": 0,
                    "http_ts_uri": "rtsp:\/\/192.168.0.69:554\/cam\/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif.ts",
                    "live_cloud_enable": 0,
                    "live_cloud_url": "rtmp:\/\/cloud.xstrive.com:19351\/live\/stream2",
                    "live_enable": 0,
                    "live_inner_enable": 1,
                    "live_inner_url": "rtmp:\/\/127.0.0.1:1935\/hlsram\/live2",
                    "live_local_url": "rtmp:\/\/127.0.0.1:1935\/hlsram\/live2",
                    "lowdelay": 1,
                    "multicast_bitrate": 7000000,
                    "multicast_enable": 0,
                    "multicast_ip": "234.5.6.7",
                    "multicast_port": 112,
                    "osd": [
                        {
                            "alpha": 128,
                            "bcolor": 0,
                            "bgalpha": 50,
                            "enable": 0,
                            "font_color": 16777215,
                            "font_size": 48,
                            "osd_type": 3,
                            "speed": 50,
                            "txt": "osd",
                            "x": 20,
                            "y": 20
                        }
                    ],
                    "recordEnable": 0,
                    "rotate": 0,
                    "rtmp2_enable": 0,
                    "rtmp2_url": "rtmp:\/\/127.0.0.1\/live\/stream2",
                    "rtmp_enable": 0,
                    "rtmp_publish_enable_write": 1,
                    "rtmp_publish_stop_port": 80,
                    "rtmp_publish_uri": "rtmp:\/\/192.168.0.15\/live\/live2",
                    "rtsp_enable": 1,
                    "rtsp_overtcp": 0,
                    "rtsp_password": "",
                    "rtsp_uri": "rtmp:\/\/192.168.0.68:1935\/42010000122000000001\/11000000441320004013",
                    "rtsp_username": "",
                    "sleep_gap": 9,
                    "snap_enable": 0,
                    "snap_interval": 200,
                    "snap_upload_enable": 0,
                    "snap_upload_url": "http:\/\/192.168.0.61\/upload",
                    "srt_enable": 0,
                    "srt_url": "srt:\/\/192.168.0.10:8004\/",
                    "transcodeEnable": 0,
                    "ts_pid": 0,
                    "vencHeight": 480,
                    "vencMaxHeight": 4320,
                    "vencMaxWidth": 7680,
                    "vencWidth": 640,
                    "venc_bitrate": 1024,
                    "venc_codec": 0,
                    "venc_fps": 30,
                    "venc_gop": 50,
                    "venc_profile": 0,
                    "venc_rc_mode": 1,
                    "venc_rotate": 0,
                    "verticalEnable": 1,
                    "video_carousel_enabled": 0,
                    "webrtcEnable": 0,
                    "webrtcPushType": 3
                }
            ],
            "vi_param": [
                {
                    "autoFocusEnable": 0,
                    "brightness": 128,
                    "contrast": 128,
                    "flip": 0,
                    "flipEnable": 1,
                    "hue": 128,
                    "interleaced": 0,
                    "ir_direction": 0,
                    "ir_status": 0,
                    "lua": 100,
                    "mirror": 0,
                    "rotate": 0,
                    "saturation": 128,
                    "sx": 32,
                    "sy": 0,
                    "viCapHeight": 1080,
                    "viCapHeightSub": 480,
                    "viCapInt": 0,
                    "viCapWidth": 1920,
                    "viCapWidthSub": 640,
                    "viFramerate": 30,
                    "viLosInt": 0,
                    "whiteLightEnable": 0
                }
            ]
        }
    ],
    "ipinfo": [
        {
            "eth_net": {
                "dhcp_enable": 0,
                "dns0": "114.114.114.114",
                "dns1": "114.114.114.114",
                "gateway": "192.168.0.1",
                "ip": "192.168.0.194",
                "mac": "7e:78:13:97:2f:11",
                "mtu": 1380,
                "netmask": "255.255.255.0"
            },
            "local_net": {
                "dhcp_enable": 0,
                "enable": 0,
                "gateway": "192.168.2.1",
                "gateway_enable": 0,
                "ip": "192.168.2.15",
                "mac": "02:11:22:96:96:70",
                "netmask": "255.255.255.0"
            },
            "local_wifi": {
                "_4g_apn": "",
                "_4g_auth": 2,
                "_4g_enable": 0,
                "_4g_password": "",
                "_4g_type": 0,
                "_4g_username": "",
                "_4g_vpn_enable": 0,
                "_4g_vpn_server": "",
                "dns0": "114.114.114.114",
                "dns1": "114.114.114.114",
                "gateway": "192.168.0.1",
                "ip": "192.168.0.10",
                "mtu": 1380,
                "netmask": "255.255.255.0",
                "usable_ssids": "",
                "wifi_ap_mode": 0,
                "wifi_dhcp": 1,
                "wifi_enable": 0,
                "wifi_essid": "xstrive",
                "wifi_hostap_essid": "default_ap_ssid",
                "wifi_hostap_psk": "12345678",
                "wifi_psk": "12345678"
            }
        }
    ],
    "sysuser": [
        {
            "soft_version": "MPA1_SINGLE_XS2.6.17_P0081", // 首页软件版本号
        }
    ],
    "syscontrol": [
        {
            "serial": "3**60aa571232d53fd5556917413fda8", // 首页序列号
        }
    ]
}

返回参数说明
见示例备注

这份文档没解决你的问题?联系我们,技术工程师直接对接。

询价咨询

填写这几项,我们 1 个工作日内回传报价与方案

点「生成询价邮件」会打开你的邮件客户端,正文已自动填好;电脑没配邮件客户端,就点「复制内容」粘到网页邮箱发送,收件人 sunshiyang@xstrive.com。