We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
描述错误 播放实时监控视频时一直提示收流超时 如何复现 见以下截图
预期行为 能够正常播放实时监控视频 截图
GB28181配置
配置文件如下 1. wvp的配置信息
sip: # [必须修改] 本机的IP ip: ${ZONE_MEDIA_SIP_IP:172.31.19.89} # [可选] 28181服务监听的端口 port: ${ZONE_MEDIA_SIP_PORT:5060} # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) # 后两位为行业编码,定义参照附录D.3 # 3701020049标识山东济南历下区 信息行业接入 # [可选] domain: ${ZONE_MEDIA_SIP_DOMAIN:4401020049} # [可选] id: ${ZONE_MEDIA_SIP_ID:44010200492000000001} # [可选] 默认设备认证密码,后续扩展使用设备单独密码, 移除密码将不进行校验 password: ${ZONE_MEDIA_SIP_PASSWORD:admin123}
#zlm 默认服务器配置 media: # [必须修改] zlm服务器唯一id,用于触发hook时区别是哪台服务器,general.mediaServerId id: ${ZONE_MEDIA_ZLM_ID:zlm_zone} # [必须修改] zlm服务器的内网IP ip: ${ZONE_MEDIA_ZLM_IP:172.31.19.89} # [必须修改] zlm服务器的http.port http-port: ${ZONE_MEDIA_ZLM_HTTP_PORT:8080} # [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip hook-ip: ${ZONE_MEDIA_HOOK_IP:172.31.19.89} # [可选] 返回流地址时的ip,置空使用 media.ip stream-ip: ${ZONE_MEDIA_STREAM_IP:172.31.19.89} # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip sdp-ip: ${ZONE_MEDIA_SDP_IP:172.31.19.89} # [可选] zlm服务器的hook.admin_params=secret secret: ${ZONE_MEDIA_ZLM_SECRET:035c73f7-bb6b-4889-a715-d9eb2d1925cc} # [可选] 是否自动配置ZLM, 如果希望手动配置ZLM, 可以设为false, 不建议新接触的用户修改 auto-config: ${ZONE_MEDIA_ZLM_AUTO_CONFIG:true} ## 无人观看多久自动关闭流, -1表示永不自动关闭,即 关闭按需拉流 stream-none-reader-delay-ms: ${ZONE_MEDIA_STREAM_NONE_READER_DELAY_MS:10000} # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试 rtp: # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输 enable: ${ZONE_MEDIA_RTP_MULTI_PORT_MODEL:true} # [可选] 在此范围内选择端口用于媒体流传输, port-range: ${ZONE_MEDIA_RTP_MULTI_PORT_RANGE:30000,30500} # 端口范围 # [可选] 国标级联在此范围内选择端口发送媒体流, send-port-range: ${ZONE_MEDIA_RTP_MULTI_PORT_SEND_RANGE:30000,30500} # 端口范围 # 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用 record-assist-port: ${ZONE_MEDIA_RECORD_ASSIST_PORT:18081}
2.zlm的配置信息
[api] apiDebug=1 defaultSnap=./www/logo.png secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc snapRoot=/opt/media/bin/www/record/snap/
[cluster] origin_url= timeout_sec=15
[ffmpeg] bin=/usr/local/bin/ffmpeg cmd=%s -fflags nobuffer -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s log=./ffmpeg/ffmpeg.log restart_sec=0 snap=%s -i %s -y -f mjpeg -t 0.001 %s
[general] addMuteAudio=1 continue_push_ms=15000 enableVhost=0 enable_audio=1 flowThreshold=1024 fmp4_demand=0 hls_demand=0 maxStreamWaitMS=15000 mediaServerId=zlm_zone mergeWriteMS=0 modifyStamp=0 publishToHls=1 publishToMP4=0 resetWhenRePlay=1 rtmp_demand=0 rtsp_demand=0 streamNoneReaderDelayMS=10000 ts_demand=0 unready_frame_cache=100 wait_add_track_ms=3000 wait_track_ready_ms=10000
[hls] broadcastRecordTs=0 deleteDelaySec=0 fileBufSize=65536 filePath=/opt/media/bin/www/record segDur=2 segNum=3 segRetain=5
[hook] admin_params=secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc alive_interval=10.0 enable=1 on_flow_report= on_http_access= on_play=http://172.31.19.89:8089/index/hook/on_play on_publish=http://172.31.19.89:8089/index/hook/on_publish on_record_mp4=http://172.31.19.89:8089/index/hook/on_record_mp4 on_record_ts= on_rtsp_auth= on_rtsp_realm= on_server_keepalive=http://172.31.19.89:8089/index/hook/on_server_keepalive on_server_started=http://172.31.19.89:8089/index/hook/on_server_started on_shell_login=http://172.31.19.89:8089/index/hook/on_shell_login on_stream_changed=http://172.31.19.89:8089/index/hook/on_stream_changed on_stream_none_reader=http://172.31.19.89:8089/index/hook/on_stream_none_reader on_stream_not_found=http://172.31.19.89:8089/index/hook/on_stream_not_found timeoutSec=20
[http] charSet=utf-8 dirMenu=1 forbidCacheSuffix= keepAliveSecond=30 maxReqSize=40960 notFound=<title>404 Not Found</title>
[multicast] addrMax=239.255.255.255 addrMin=239.0.0.0 udpTTL=64
[record] appName=record fastStart=0 fileBufSize=65536 filePath=/opt/media/bin/www/record fileRepeat=0 fileSecond=3600 sampleMS=500
[rtc] externIP=172.31.19.89 port=8000 preferredCodecA=PCMU,PCMA,opus,mpeg4-generic preferredCodecV=H264,H265,AV1X,VP9,VP8 rembBitRate=0 timeoutSec=15
[rtmp] handshakeSecond=15 keepAliveSecond=15 modifyStamp=0 port=1935 sslport=0
[rtp] audioMtuSize=600 rtpMaxSize=10 videoMtuSize=1400
[rtp_proxy] dumpDir= port=10000 port_range=30000-35000 timeoutSec=15
[rtsp] authBasic=0 directProxy=1 handshakeSecond=15 keepAliveSecond=15 port=554 sslport=0
[shell] maxReqSize=1024 port=0
3.docker-compose的配置信息 media_zlmediakit: image: zlmediakit/zlmediakit:Release.last restart: always ports: - "1935:1935" # http服务器监听端口 - "8089:80" # rtsp服务端口 - "8554:554" # 代理服务端口(推流接收端口) - "10000:10000" - "10000:10000/udp" # WebRTC端口 - "8000:8000/udp" environment: TZ: Asia/Shanghai mediaServerId: zlm_zone volumes: - /opt/zone/zlmediakit.ini:/opt/media/conf/config.ini:ro - /data/zone/media/ZLMediaKit/record:/opt/media/bin/www/record - /data/zone/media/ZLMediaKit/log:/opt/media/bin/log media: image: zone/media:1.0.1 restart: always ports: # API Server - "3003:3003" # GB28181 Port - "5060:5060" - "5060:5060/udp" environment: TZ: Asia/Shanghai ZONE_MEDIA_PROFILE: dev ZONE_MEDIA_SERVER_PORT: 3003 ZONE_MEDIA_SERVER_CONTEXT_PATH: "/media" ZONE_MEDIA_SWAGGER_ENABLED: "false" ZONE_MEDIA_REDIS_HOST: redis ZONE_MEDIA_REDIS_DATABASE_INDEX: 8 ZONE_MEDIA_REDIS_PASSWORD: c283350f-1f34-4102-a5c4-bf2fb940b170 ZONE_MEDIA_MYSQL_HOST: 172.31.19.89 ZONE_MEDIA_MYSQL_PORT: 3306 ZONE_MEDIA_MYSQL_DATABASE: zone_media # DATASOURCE_URL: jdbc:mysql://mysql:3306/zone_media?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true ZONE_MEDIA_MYSQL_USERNAME: root ZONE_MEDIA_MYSQL_PASSWORD: e22198ee-5d29-487c-8345-835db73f0ba0 ZONE_MEDIA_ZLM_ID: zlm_zone ZONE_MEDIA_ZLM_IP: 172.31.19.89 ZONE_MEDIA_ZLM_HTTP_PORT: 8089 ZONE_MEDIA_ZLM_SECRET: 035c73f7-bb6b-4889-a715-d9eb2d1925cc ZONE_MEDIA_ZLM_AUTO_CONFIG: "false" ZONE_MEDIA_STREAM_NONE_READER_DELAY_MS: 10000 ZONE_MEDIA_SIP_ID: 44030500492000000001 ZONE_MEDIA_SIP_IP: 172.31.19.89 ZONE_MEDIA_SIP_PORT: 5060 ZONE_MEDIA_SIP_DOMAIN: 4403050049 ZONE_MEDIA_SIP_PASSWORD: admin123 ZONE_MEDIA_HOOK_IP: 172.31.19.89 ZONE_MEDIA_STREAM_IP: 172.31.19.89 ZONE_MEDIA_SDP_IP: 172.31.19.89 ZONE_MEDIA_RTP_MULTI_PORT_MODEL: "false" ZONE_MEDIA_AUTO_APPLY_PLAY: "false" ZONE_MEDIA_RECORD_PUSH_LIVE: "true" ZONE_MEDIA_RECORD_GB28181_SIP: "false" ZONE_MEDIA_SENIOR_SDP: "true" ZONE_MEDIA_POSITION_HISTORY: "false" ZONE_MEDIA_PLAY_TIMEOUT: 10000 ZONE_MEDIA_PLATFORM_PLAY_TIMEOUT: 60000 ZONE_MEDIA_REDIS_CONFIG: "true"
环境信息:
The text was updated successfully, but these errors were encountered:
参考#434
Sorry, something went wrong.
No branches or pull requests
描述错误
播放实时监控视频时一直提示收流超时
如何复现
见以下截图
预期行为
能够正常播放实时监控视频
截图
GB28181配置
配置文件如下
1. wvp的配置信息
作为28181服务器的配置
sip:
# [必须修改] 本机的IP
ip: ${ZONE_MEDIA_SIP_IP:172.31.19.89}
# [可选] 28181服务监听的端口
port: ${ZONE_MEDIA_SIP_PORT:5060}
# 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007)
# 后两位为行业编码,定义参照附录D.3
# 3701020049标识山东济南历下区 信息行业接入
# [可选]
domain: ${ZONE_MEDIA_SIP_DOMAIN:4401020049}
# [可选]
id: ${ZONE_MEDIA_SIP_ID:44010200492000000001}
# [可选] 默认设备认证密码,后续扩展使用设备单独密码, 移除密码将不进行校验
password: ${ZONE_MEDIA_SIP_PASSWORD:admin123}
#zlm 默认服务器配置
media:
# [必须修改] zlm服务器唯一id,用于触发hook时区别是哪台服务器,general.mediaServerId
id: ${ZONE_MEDIA_ZLM_ID:zlm_zone}
# [必须修改] zlm服务器的内网IP
ip: ${ZONE_MEDIA_ZLM_IP:172.31.19.89}
# [必须修改] zlm服务器的http.port
http-port: ${ZONE_MEDIA_ZLM_HTTP_PORT:8080}
# [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
hook-ip: ${ZONE_MEDIA_HOOK_IP:172.31.19.89}
# [可选] 返回流地址时的ip,置空使用 media.ip
stream-ip: ${ZONE_MEDIA_STREAM_IP:172.31.19.89}
# [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip
sdp-ip: ${ZONE_MEDIA_SDP_IP:172.31.19.89}
# [可选] zlm服务器的hook.admin_params=secret
secret: ${ZONE_MEDIA_ZLM_SECRET:035c73f7-bb6b-4889-a715-d9eb2d1925cc}
# [可选] 是否自动配置ZLM, 如果希望手动配置ZLM, 可以设为false, 不建议新接触的用户修改
auto-config: ${ZONE_MEDIA_ZLM_AUTO_CONFIG:true}
## 无人观看多久自动关闭流, -1表示永不自动关闭,即 关闭按需拉流
stream-none-reader-delay-ms: ${ZONE_MEDIA_STREAM_NONE_READER_DELAY_MS:10000}
# 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试
rtp:
# [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输
enable: ${ZONE_MEDIA_RTP_MULTI_PORT_MODEL:true}
# [可选] 在此范围内选择端口用于媒体流传输,
port-range: ${ZONE_MEDIA_RTP_MULTI_PORT_RANGE:30000,30500} # 端口范围
# [可选] 国标级联在此范围内选择端口发送媒体流,
send-port-range: ${ZONE_MEDIA_RTP_MULTI_PORT_SEND_RANGE:30000,30500} # 端口范围
# 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用
record-assist-port: ${ZONE_MEDIA_RECORD_ASSIST_PORT:18081}
2.zlm的配置信息
[api]
apiDebug=1
defaultSnap=./www/logo.png
secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
snapRoot=/opt/media/bin/www/record/snap/
[cluster]
origin_url=
timeout_sec=15
[ffmpeg]
bin=/usr/local/bin/ffmpeg
cmd=%s -fflags nobuffer -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s
log=./ffmpeg/ffmpeg.log
restart_sec=0
snap=%s -i %s -y -f mjpeg -t 0.001 %s
[general]
addMuteAudio=1
continue_push_ms=15000
enableVhost=0
enable_audio=1
flowThreshold=1024
fmp4_demand=0
hls_demand=0
maxStreamWaitMS=15000
mediaServerId=zlm_zone
mergeWriteMS=0
modifyStamp=0
publishToHls=1
publishToMP4=0
resetWhenRePlay=1
rtmp_demand=0
rtsp_demand=0
streamNoneReaderDelayMS=10000
ts_demand=0
unready_frame_cache=100
wait_add_track_ms=3000
wait_track_ready_ms=10000
[hls]
broadcastRecordTs=0
deleteDelaySec=0
fileBufSize=65536
filePath=/opt/media/bin/www/record
segDur=2
segNum=3
segRetain=5
[hook]
admin_params=secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
alive_interval=10.0
enable=1
on_flow_report=
on_http_access=
on_play=http://172.31.19.89:8089/index/hook/on_play
on_publish=http://172.31.19.89:8089/index/hook/on_publish
on_record_mp4=http://172.31.19.89:8089/index/hook/on_record_mp4
on_record_ts=
on_rtsp_auth=
on_rtsp_realm=
on_server_keepalive=http://172.31.19.89:8089/index/hook/on_server_keepalive
on_server_started=http://172.31.19.89:8089/index/hook/on_server_started
on_shell_login=http://172.31.19.89:8089/index/hook/on_shell_login
on_stream_changed=http://172.31.19.89:8089/index/hook/on_stream_changed
on_stream_none_reader=http://172.31.19.89:8089/index/hook/on_stream_none_reader
on_stream_not_found=http://172.31.19.89:8089/index/hook/on_stream_not_found
timeoutSec=20
[http]
charSet=utf-8
dirMenu=1
forbidCacheSuffix=
keepAliveSecond=30
maxReqSize=40960
notFound=<title>404 Not Found</title>
您访问的资源不存在!
ZLMediaKit(git hash:a3d696d,branch:master,build time:Feb 23 2022 12:29:13)
port=80
rootPath=./www
sendBufSize=65536
sslport=443
virtualPath=
[multicast]
addrMax=239.255.255.255
addrMin=239.0.0.0
udpTTL=64
[record]
appName=record
fastStart=0
fileBufSize=65536
filePath=/opt/media/bin/www/record
fileRepeat=0
fileSecond=3600
sampleMS=500
[rtc]
externIP=172.31.19.89
port=8000
preferredCodecA=PCMU,PCMA,opus,mpeg4-generic
preferredCodecV=H264,H265,AV1X,VP9,VP8
rembBitRate=0
timeoutSec=15
[rtmp]
handshakeSecond=15
keepAliveSecond=15
modifyStamp=0
port=1935
sslport=0
[rtp]
audioMtuSize=600
rtpMaxSize=10
videoMtuSize=1400
[rtp_proxy]
dumpDir=
port=10000
port_range=30000-35000
timeoutSec=15
[rtsp]
authBasic=0
directProxy=1
handshakeSecond=15
keepAliveSecond=15
port=554
sslport=0
[shell]
maxReqSize=1024
port=0
3.docker-compose的配置信息
media_zlmediakit:
image: zlmediakit/zlmediakit:Release.last
restart: always
ports:
- "1935:1935"
# http服务器监听端口
- "8089:80"
# rtsp服务端口
- "8554:554"
# 代理服务端口(推流接收端口)
- "10000:10000"
- "10000:10000/udp"
# WebRTC端口
- "8000:8000/udp"
environment:
TZ: Asia/Shanghai
mediaServerId: zlm_zone
volumes:
- /opt/zone/zlmediakit.ini:/opt/media/conf/config.ini:ro
- /data/zone/media/ZLMediaKit/record:/opt/media/bin/www/record
- /data/zone/media/ZLMediaKit/log:/opt/media/bin/log
media:
image: zone/media:1.0.1
restart: always
ports:
# API Server
- "3003:3003"
# GB28181 Port
- "5060:5060"
- "5060:5060/udp"
environment:
TZ: Asia/Shanghai
ZONE_MEDIA_PROFILE: dev
ZONE_MEDIA_SERVER_PORT: 3003
ZONE_MEDIA_SERVER_CONTEXT_PATH: "/media"
ZONE_MEDIA_SWAGGER_ENABLED: "false"
ZONE_MEDIA_REDIS_HOST: redis
ZONE_MEDIA_REDIS_DATABASE_INDEX: 8
ZONE_MEDIA_REDIS_PASSWORD: c283350f-1f34-4102-a5c4-bf2fb940b170
ZONE_MEDIA_MYSQL_HOST: 172.31.19.89
ZONE_MEDIA_MYSQL_PORT: 3306
ZONE_MEDIA_MYSQL_DATABASE: zone_media
# DATASOURCE_URL: jdbc:mysql://mysql:3306/zone_media?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
ZONE_MEDIA_MYSQL_USERNAME: root
ZONE_MEDIA_MYSQL_PASSWORD: e22198ee-5d29-487c-8345-835db73f0ba0
ZONE_MEDIA_ZLM_ID: zlm_zone
ZONE_MEDIA_ZLM_IP: 172.31.19.89
ZONE_MEDIA_ZLM_HTTP_PORT: 8089
ZONE_MEDIA_ZLM_SECRET: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
ZONE_MEDIA_ZLM_AUTO_CONFIG: "false"
ZONE_MEDIA_STREAM_NONE_READER_DELAY_MS: 10000
ZONE_MEDIA_SIP_ID: 44030500492000000001
ZONE_MEDIA_SIP_IP: 172.31.19.89
ZONE_MEDIA_SIP_PORT: 5060
ZONE_MEDIA_SIP_DOMAIN: 4403050049
ZONE_MEDIA_SIP_PASSWORD: admin123
ZONE_MEDIA_HOOK_IP: 172.31.19.89
ZONE_MEDIA_STREAM_IP: 172.31.19.89
ZONE_MEDIA_SDP_IP: 172.31.19.89
ZONE_MEDIA_RTP_MULTI_PORT_MODEL: "false"
ZONE_MEDIA_AUTO_APPLY_PLAY: "false"
ZONE_MEDIA_RECORD_PUSH_LIVE: "true"
ZONE_MEDIA_RECORD_GB28181_SIP: "false"
ZONE_MEDIA_SENIOR_SDP: "true"
ZONE_MEDIA_POSITION_HISTORY: "false"
ZONE_MEDIA_PLAY_TIMEOUT: 10000
ZONE_MEDIA_PLATFORM_PLAY_TIMEOUT: 60000
ZONE_MEDIA_REDIS_CONFIG: "true"
环境信息:
wvp-pro 采用docker打包为镜像部署,zlm是从docker hub拉下来的镜像方式部署
centos7 内网环境
wvp-pro开发的端口: 3003, 5060; zlm开放的端口: 8089(http hook), 1935, 8554(rtsp), 10000(代理服务推流端口), 8000(WebRTC端口)
wvp, zlm均部署在一台内网服务器上面
否
海康摄像头
检查端口开放情况,比对配置,代码本地调试
The text was updated successfully, but these errors were encountered: