648540858 / wvp-GB28181-pro

WEB VIDEO PLATFORM是一个基于GB28181-2016标准实现的网络视频平台,支持NAT穿透,支持海康、大华、宇视等品牌的IPC、NVR、DVR接入。支持国标级联,支持rtsp/rtmp等视频流转发到国标平台,支持rtsp/rtmp等推流转发到国标平台。
https://doc.wvp-pro.cn
MIT License
4.78k stars 1.42k forks source link

大佬救命:wvp在云服务器无法播放 #37

Closed 18285160741 closed 3 years ago

18285160741 commented 3 years ago

wvp在云服务器、zlm在内网(用花生壳映射)、内网摄像头连接wvp能注册但无法播放。点击播放、总是Timeout

648540858 commented 3 years ago

看下你的配置,确认你的zlm配置正确,否则设备无法推流到zlm就会出现超时

18285160741 commented 3 years ago

看下你的配置,确认你的zlm配置正确,否则设备无法推流到zlm就会出现超时

这个是zlm的config.ini

; auto-generated by mINI class {

[api] apiDebug=1 defaultSnap=./www/logo.png secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc snapRoot=./www/snap/

[ffmpeg] bin=C:/soft/ffmpeg-4.3.1-2021-01-01-full_build/bin/ffmpeg.exe cmd=%s -re -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s log=./ffmpeg/ffmpeg.log snap=%s -i %s -y -f mjpeg -t 0.001 %s

[general] addMuteAudio=1 enableVhost=0 flowThreshold=1024 fmp4_demand=0 hls_demand=0 maxStreamWaitMS=15000 mediaServerId=uxBEHKORUY147beh mergeWriteMS=0 modifyStamp=0 publishToHls=1 publishToMP4=0 resetWhenRePlay=1 rtmp_demand=0 rtsp_demand=0 streamNoneReaderDelayMS=20000 ts_demand=0

[hls] broadcastRecordTs=0 fileBufSize=65536 filePath=./www segDur=2 segNum=3 segRetain=5

[hook] admin_params=secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc enable=1 on_flow_report=http://video.hashstar.cn/index/hook/on_flow_report on_http_access=http://video.hashstar.cn/index/hook/on_http_access on_play=http://video.hashstar.cn/index/hook/on_play on_publish=http://video.hashstar.cn/index/hook/on_publish on_record_mp4=http://video.hashstar.cn/index/hook/on_record_mp4 on_record_ts= on_rtsp_auth=http://video.hashstar.cn/index/hook/on_rtsp_auth on_rtsp_realm=http://video.hashstar.cn/index/hook/on_rtsp_realm on_server_started=http://video.hashstar.cn/index/hook/on_server_started on_shell_login=http://video.hashstar.cn/index/hook/on_shell_login on_stream_changed=http://video.hashstar.cn/index/hook/on_stream_changed on_stream_none_reader=http://video.hashstar.cn/index/hook/on_stream_none_reader on_stream_not_found=http://video.hashstar.cn/index/hook/on_stream_not_found timeoutSec=10

[http] charSet=gb2312 dirMenu=1 keepAliveSecond=15 maxReqSize=4096 notFound=404 Not Found

您访问的资源不存在!


ZLMediaKit-5.0(build in Jan 12 2021 11:23:54)
port=8282 rootPath=./www sendBufSize=65536 sslport=443

[multicast] addrMax=239.255.255.255 addrMin=239.0.0.0 udpTTL=64

[record] appName=record fastStart=0 fileBufSize=65536 filePath=./www fileRepeat=0 fileSecond=3600 sampleMS=500

[rtmp] handshakeSecond=15 keepAliveSecond=15 modifyStamp=0 port=1935 sslport=19350

[rtp] audioMtuSize=600 clearCount=10 cycleMS=46800000 maxRtpCount=50 videoMtuSize=1400

[rtp_proxy] checkSource=1 dumpDir= port=10000 timeoutSec=15

[rtsp] authBasic=0 directProxy=1 handshakeSecond=15 keepAliveSecond=15 port=554 sslport=332

[shell] maxReqSize=1024 port=9000

; } ---

18285160741 commented 3 years ago

看下你的配置,确认你的zlm配置正确,否则设备无法推流到zlm就会出现超时

这个是wvp配置的zlm信息

zlm服务器配置

media:

[必须修改] zlm服务器的内网IP

ip: 192.168.31.241
# [可选] zlm服务器的公网IP, 内网部署置空即可
wanIp: 3276m444k0.qicp.vip
# [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
hookIp: 39.99.188.174
# [必须修改] zlm服务器的http.port
port: 8282
# [可选] 是否自动配置ZLM, 如果希望手动配置ZLM, 可以设为false, 不建议新接触的用户修改
autoConfig: false
# [可选] zlm服务器的hook.admin_params=secret
secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
# [可选] zlm服务器的general.streamNoneReaderDelayMS
streamNoneReaderDelayMS:  600000  # 无人观看多久自动关闭流, -1表示永不自动关闭,即 关闭按需拉流
# [可选] 自动点播, 使用固定流地址进行播放时,如果未点播则自动进行点播, 需要rtp.enable=true
autoApplyPlay: true
# [可选] 部分设备需要扩展SDP,需要打开此设置
seniorSdp: false
# 启用udp多端口模式, 详细解释参考: https://github.com/xia-chu/ZLMediaKit/wiki/GB28181%E6%8E%A8%E6%B5%81 下的高阶使用
rtp:
    # [可选] 是否启用udp多端口模式, 开启后会在udpPortRange范围内选择端口用于媒体流传输
    enable: true
    # [可选] 在此范围内选择端口用于媒体流传输, 不只是udp, 使用TCP被动传输模式时,也是从这个范围内选择端口
    udpPortRange: 30000,30500 # 端口范围
648540858 commented 3 years ago

3276m444k0.qicp.vip 你这是域名吧 不支持这个, 你换成实际的公网ip再试试

18285160741 commented 3 years ago

3276m444k0.qicp.vip 你这是域名吧 不支持这个, 你换成实际的公网ip再试试

ZLM在内网、用花生壳域名映射的。WVP在云服务器上、WVP通过这个域名才能访问到内网的ZLM呀

648540858 commented 3 years ago

你的zlm需要部署到公网,映射的方式只是内网穿透, 设备会找不到zlm,这个我关闭了。

18285160741 commented 3 years ago

你的zlm需要部署到公网,映射的方式只是内网穿透, 设备会找不到zlm,这个我关闭了。

ZLM部署在公网、录制的文件也就存在服务器了呀。 ZLM部署在内网就是想让录制文件存在本地来着

648540858 commented 3 years ago

录像你可以定期从云服务同步下来, 设备一般也不支持根据域名推流, 我这里都是使用ip测试。

18285160741 commented 3 years ago

录像你可以定期从云服务同步下来, 设备一般也不支持根据域名推流, 我这里都是使用ip测试。

好的,谢谢指点

648540858 commented 3 years ago

内网穿透, 也可以用frp试试, 我了解不多,这样应该可以避免使用域名。