Fri. Sep 20th, 2024

cómo convertir cualquier cámara web en una cámara IP con todas las funciones

By admin Jan 29, 2024

Este es un proyecto simple que te ayudará a convertir cualquier cámara web en una cámara IP a la que podrás acceder desde cualquier lugar.

El proyecto está escrito en lenguaje Go y funciona en Windows, Linux, macOS y Raspberry Pi.

Requisitos

  • libjpeg-turbo (usar -tags jpeg construir sin CGo)
  • En Go nativo de Linux/RPi V4L La implementación se utiliza para capturar imágenes.
  • En Windows Vídeo para Windows (VfW) El marco se utiliza sobre la API win32.

Licencia

  • cv2 – construir con OpenCV 2.x (ir-opencv)
  • cv4 – construir con OpenCV 4.x (gocv)
  • jpeg – construir con Go nativo image/jpeg en lugar de libjpeg-turbo

Descargar

Los binarios se compilan con bibliotecas estáticas OpenCV/libjpeg-turbo, deberían funcionar:

Instalación

go get -v github.com/gen2brain/cam2ip/cmd/cam2ip

Ejecutar usando Docker

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

Uso

Usage of cam2ip:
-bind-addr string
Bind address [CAM2IP_BIND_ADDR] (default ":56000")
-delay int
Delay between frames, in milliseconds [CAM2IP_DELAY] (default 10)
-height float
Frame height [CAM2IP_HEIGHT] (default 480)
-htpasswd-file string
Path to htpasswd file, if empty auth is disabled [CAM2IP_HTPASSWD_FILE]
-index int
Camera index [CAM2IP_INDEX]
-nowebgl
Disable WebGL drawing of images (html handler) [CAM2IP_NOWEBGL]
-rotate int
Rotate image, valid values are 90, 180, 270 [CAM2IP_ROTATE]
-timestamp
Draws timestamp on images [CAM2IP_TIMESTAMP]
-video-file string
Use video file instead of camera [CAM2IP_VIDEO_FILE]
-width float
Frame width [CAM2IP_WIDTH] (default 640)

Manipuladores

  • /html: Controlador HTML, los marcos se envían al lienzo a través de websocket
  • /jpeg: Controlador JPEG estático
  • /mjpeg: Motion JPEG, compatible de forma nativa con los principales navegadores web

Recursos

Etiquetas

Seguridad RaspberryPi Hackeo de Python Cámara IP CCTV de código abierto

By admin

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *