如何使用端口访问Raspberry Pi Motion中的网络摄像头

时间:2017-06-06 18:39:23

标签: raspberry-pi video-streaming raspberry-pi2 raspberry-pi3 motion-detection

我正在使用视频流,使用本教程配置:https://pimylifeup.com/raspberry-pi-webcam-server

我是否可以使用类似“ip:/ cam1”的链接配置动作以访问网络摄像头,其中ip类似于“146.106.91.100”,而不是使用端口“:8081”?

谢谢!

2 个答案:

答案 0 :(得分:0)

我从未使用过您的软件,但经过快速搜索后,您似乎可以修改motion.conf配置文件中的以下指令:

############################################################
# HTTP Based Control
############################################################

# TCP/IP port for the http server to listen on (default: 0 = disabled)
webcontrol_port 8081

将该端口更改为80。这将阻止您必须在URL中指定端口。

请注意,Unix系统不允许超级用户(root)以外的任何人在端口号上启动服务< 1024,因此您需要以rootsudo运行应用程序。这可能会导致安全问题,但我不建议采用这种方法,除非您非常确信这是在私有和/或安全网络上。

答案 1 :(得分:0)

您可以像这样配置您的流:

cvlc v4l2:// v4l2-dev=/dev/video0 --sout '#standard{access=http,mux=ts,dst=:8080}' :demux=h264

cvlc v4l2:// v4l2-dev=/dev/video0 --sout '#standard{access=http,mux=ts,dst=:8080/cam1}' :demux=h264

cvlc v4l2:// v4l2-dev=/dev/video0 --sout '#standard{access=http,mux=ts,dst=/cam1}' :demux=h264

在上一个示例中,您必须注意系统上的端口80可用。它通常由网络服务器使用。