我希望能够在网上看到闭路电视屏幕。
我一直在做一个项目,让ip摄像头可以在网上观看。然后,我被要求使同轴相机在网络上可见。所以我决定用DVR。首先,我把DVR连接到路由器上。然后DVR接收同轴摄像机的输入,DVR通过路由器发送信息。通过这个过程,我证实了rtsp正常工作。但它在网络上行不通。
我目前正在使用nginx web服务器。并使用ffmpeg在我的nginx web服务器上向rtmp发送rtsp信息。然后,web服务器将将其转换为hls (index.m3u8)文件。我觉得在这个过程中出了点问题。
丁香康菲
# RTMP Config
rtmp {
server {
listen 1935; # Listen on standard RTMP port
chunk_size 4000;
application live{
live on;
deny play all;
push rtmp://localhost/play;
on_publish http://localhost:3001/api/on-live-auth;
on_publish_done http://localhost:3001/api/on-live-done;
}
application play {
live on;
# Turn on HLS
hls on;
hls_nested on;
hls_fragment_naming system;
hls_path /home/banana/nginx/live;
hls_fragment 3;
hls_playlist_length 60;
# disable consuming the stream from nginx as rtmp
#deny play all;
}
}
}
# End RTMP ConfigFFMPEG命令
ffmpeg -i rtsp://<cameraIp> -c:v copy -rtsp_transport tcp -preset veryfast -c:a copy -fflags +igndts+genpts -f flv rtmp://localhost/live/<cameraId>测试结果
IP摄像机RTSP地址= admin:qwerty1.@ssnet4.iptime.org:555/trackID=3
DVR RTSP地址=admin:HRD-442 s@h支ptz.iptime.org:4524/1
分别在vlc player中运行上述rtsp地址。
成功: IP摄像头RTSP地址,DVR RTSP地址
IP摄像机HLS地址= http://168.131.150.80:4567/live/5c28ae28c6cd0c6c329e1ebc/index.m3u8
DVR地址= http://168.131.150.80:4567/live/5c8746c9d7d74a600edf2460/index.m3u8
分别在vlc player中运行上述rtsp地址。
成功: IP摄像头HLS地址
失败: DVR HLS地址
这是同样的结果对反应球员。
const streamUrl = `http://168.131.150.80:4567/live/<cameraId>/index.m3u8`;
<ReactPlayer
onClick={this._onClickFullscreen}
width={"100%"}
height={"100%"}
url={streamUrl}
playing={true}
controls={false}
muted={true}
/>问题
发布于 2019-03-12 14:45:59
不是的。没有理由在没有安装插件的情况下在网页浏览器中看到RTSP。
web浏览器支持的唯一协议是http、web套接字和webrtx。
https://stackoverflow.com/questions/55116924
复制相似问题