cam2ip

将任何网络摄像头变成 IP 摄像头。「Turn any webcam into an IP camera」

  • 所有者: gen2brain/cam2ip
  • 平台: Linux,Windows,Mac,Docker,Raspberry Pi OS
  • 許可證: GNU General Public License v3.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

cam2ip

Turn any webcam into an IP camera.

Example (in web browser):

http://localhost:56000/html

or

http://localhost:56000/mjpeg

You can also use apps like ffplay or vlc:

ffplay -i http://localhost:56000/mjpeg

Requirements

  • On Linux/RPi native Go V4L implementation is used to capture images.
  • On Windows Video for Windows (VfW) framework is used over win32 API.

Build tags

  • opencv - use OpenCV library to access camera (gocv)
  • libjpeg - build with libjpeg (go-libjpeg) instead of native image/jpeg
  • jpegli - build with jpegli (jpegli) instead of native image/jpeg

Download

Download the latest binaries from the releases.

Installation

go install github.com/gen2brain/cam2ip/cmd/cam2ip@latest

This command will install cam2ip in GOBIN, you can point GOBIN to e.g. /usr/local/bin or ~/.local/bin.

Run in Docker container

docker run --device=/dev/video0:/dev/video0 -p56000:56000 -it gen2brain/cam2ip # on RPi use gen2brain/cam2ip:arm

Usage

Usage: cam2ip [<flags>]
  --index
    	Camera index [CAM2IP_INDEX] (default "0")
  --delay
    	Delay between frames, in milliseconds [CAM2IP_DELAY] (default "10")
  --width
    	Frame width [CAM2IP_WIDTH] (default "640")
  --height
    	Frame height [CAM2IP_HEIGHT] (default "480")
  --quality
    	Image quality [CAM2IP_QUALITY] (default "75")
  --rotate
    	Rotate image, valid values are 90, 180, 270 [CAM2IP_ROTATE] (default "0")
  --flip
    	Flip image, valid values are horizontal and vertical [CAM2IP_FLIP] (default "")
  --no-webgl
    	Disable WebGL drawing of image (html handler) [CAM2IP_NO_WEBGL] (default "false")
  --timestamp
    	Draws timestamp on image [CAM2IP_TIMESTAMP] (default "false")
  --time-format
    	Time format [CAM2IP_TIME_FORMAT] (default "2006-01-02 15:04:05")
  --bind-addr
    	Bind address [CAM2IP_BIND_ADDR] (default ":56000")
  --htpasswd-file
    	Path to htpasswd file, if empty auth is disabled [CAM2IP_HTPASSWD_FILE] (default "")

Handlers

  • /html: HTML handler, frames are pushed to canvas over websocket
  • /jpeg: Static JPEG handler
  • /mjpeg: Motion JPEG, supported natively in major web browsers

主要指標

概覽
名稱與所有者gen2brain/cam2ip
主編程語言Go
編程語言Go (語言數: 3)
平台
許可證GNU General Public License v3.0
所有者活动
創建於2017-10-03 18:49:23
推送於2025-06-15 06:50:28
最后一次提交2025-06-15 08:48:39
發布數7
最新版本名稱1.6 (發布於 )
第一版名稱1.0 (發布於 )
用户参与
星數0.9k
關注者數35
派生數99
提交數97
已啟用問題?
問題數49
打開的問題數15
拉請求數4
打開的拉請求數0
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?