Turn any webcam into an IP camera
Switch branches/tags
Clone or download
Latest commit c9d77f0 Oct 10, 2018
Permalink
Failed to load latest commit information.
camera Add rotate option Oct 10, 2018
encoder Allow use of native image/jpeg Jul 17, 2018
handlers Add video file reader Jan 27, 2018
reader New release Jan 27, 2018
server Add rotate option Oct 10, 2018
video Add rotate option Oct 10, 2018
AUTHORS Initial commit Oct 3, 2017
COPYING Initial commit Oct 3, 2017
README.md Add rotate option Oct 10, 2018
cam2ip.go Add rotate option Oct 10, 2018
make.bash Add rotate option Oct 10, 2018

README.md

cam2ip

Turn any webcam into an IP camera.

Example (in web browser):

http://localhost:56000/mjpeg

or

http://localhost:56000/html

Requirements

  • OpenCV (default is version 2.x via go-opencv, use -tags cv3 for gocv)
  • libjpeg-turbo (use -tags jpeg for native image/jpeg, but note that CPU usage will be much higher)

Download

Binaries are compiled with static OpenCV/libjpeg-turbo libraries, they should just work:

Installation

go get -v github.com/gen2brain/cam2ip

This will install app in $GOPATH/bin/cam2ip.

Usage

Usage of ./cam2ip:
  -bind-addr string
        Bind address (default ":56000")
  -delay int
        Delay between frames, in milliseconds (default 10)
  -height float
        Frame height (default 480)
  -width float
        Frame width (default 640)
  -htpasswd-file string
        Path to htpasswd file, if empty auth is disabled
  -index int
        Camera index
  -nowebgl
        Disable WebGL drawing of images (html handler)
  -rotate int
    	Rotate image, valid values are 90, 180, 270
  -video-file string
    	Use video file instead of camera

Handlers

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