【问题标题】:How to access a webcam in Raspberry Pi Motion instead using the port如何在 Raspberry Pi Motion 中访问网络摄像头,而不是使用端口
【发布时间】:2017-06-06 18:39:22
【问题描述】:

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

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

谢谢!

【问题讨论】:

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


    【解决方案1】:

    我从来没有使用过你的软件,但是在快速搜索之后,似乎你可以在你的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 运行应用程序.不过,这可能会引发严重的安全问题,因此我不建议您采用这种方法,除非您非常确信这是在私有和/或安全网络上。

    【讨论】:

      【解决方案2】:

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

      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 在您的系统上可用。它通常由网络服务器使用。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-12-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-03-29
        相关资源
        最近更新 更多