All Projects → miguelangel-nubla → Videop2proxy

miguelangel-nubla / Videop2proxy

Licence: mit
Proxy to enable P2P only cameras to work with standard protocols.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Videop2proxy

Yi Hack V4
New Custom Firmware for Xiaomi Cameras based on Hi3518e Chipset. It features RTSP, SSH, FTP and more!
Stars: ✭ 1,183 (+1059.8%)
Mutual labels:  xiaomi, camera, rtsp
Rtspallthethings
Deprecated RTSP media server -- Use github.com/aler9/rtsp-simple-server instead.
Stars: ✭ 258 (+152.94%)
Mutual labels:  camera, rtsp
esp32cam-ready
Plug and Play firmware for the esp32cam. Flash, provision and connect to rtsp.
Stars: ✭ 67 (-34.31%)
Mutual labels:  camera, rtsp
Yi Hack Mstar
Custom firmware for Yi 1080p camera based on MStar platform
Stars: ✭ 446 (+337.25%)
Mutual labels:  camera, rtsp
eufy security
Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
Stars: ✭ 242 (+137.25%)
Mutual labels:  camera, rtsp
Custom-Software-For-Xiaomi-Dafang
API and panel site for Xiaomi Dafang
Stars: ✭ 36 (-64.71%)
Mutual labels:  camera, xiaomi
Moonfire Nvr
Moonfire NVR, a security camera network video recorder
Stars: ✭ 418 (+309.8%)
Mutual labels:  camera, rtsp
Yi Hack Allwinner
Custom firmware for Yi 1080p camera based on Allwinner platform
Stars: ✭ 243 (+138.24%)
Mutual labels:  camera, rtsp
Awesome Anti Censorship
curated list of open-source anti-censorship tools
Stars: ✭ 521 (+410.78%)
Mutual labels:  proxy, p2p
Nsmartproxy
NSmartProxy是一款开源免费的内网穿透工具。采用.NET CORE的全异步模式打造。(NSmartProxy is an open source reverse proxy tool that creates a secure tunnel from a public endpoint to a locally service.)
Stars: ✭ 547 (+436.27%)
Mutual labels:  proxy, p2p
Onvifcamera
Pod and example on how to connect to an ONVIF camera
Stars: ✭ 66 (-35.29%)
Mutual labels:  camera, rtsp
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (-73.53%)
Mutual labels:  camera, rtsp
xiaomi gdrive
Google drive loader for xiaomi smart ip camera
Stars: ✭ 70 (-31.37%)
Mutual labels:  camera, xiaomi
WebRTCCTV
WebRTCCTV is a signaling server & webapp able to stream from RTSP cameras using WebRTC
Stars: ✭ 32 (-68.63%)
Mutual labels:  camera, rtsp
Zsgx1hacks
Hacks for ZS-GX1 IP Camera and various Goke GK7102 based IP Cameras
Stars: ✭ 251 (+146.08%)
Mutual labels:  camera, rtsp
Xiaopi
An Open Source Home Security Camera For Raspberry Pi
Stars: ✭ 311 (+204.9%)
Mutual labels:  camera, rtsp
Camerattack
An attack tool designed to remotely disable CCTV camera streams (like in spy movies)
Stars: ✭ 192 (+88.24%)
Mutual labels:  camera, rtsp
Videocalling
局域网p2p视频聊天
Stars: ✭ 223 (+118.63%)
Mutual labels:  camera, p2p
Gsnova
Private proxy solution & network troubleshooting tool.
Stars: ✭ 509 (+399.02%)
Mutual labels:  proxy, p2p
Frigate
NVR with realtime local object detection for IP cameras
Stars: ✭ 1,329 (+1202.94%)
Mutual labels:  camera, rtsp

videoP2Proxy

Proxy to enable xiaomi P2P only cameras to work with standard protocols.
Works without changing the firmware of the camera, MiHome cloud will continue to work.

Known working models

  • Xiaomi Aqara Smart Gateway IP Camera: lumi.camera.aq1
  • Other Xiaomi cameras should also work, please test and report with a issue

Quick start on Raspbian

Install dependencies

  1. Install dependency packages
sudo apt-get install build-essential git python3 python3-dev autoconf automake libtool liblivemedia-dev libjson-c-dev
  1. Install https://github.com/rytilahti/python-miio
pip3 install python-miio
Clone repository
git clone https://github.com/miguelangel-nubla/videoP2Proxy.git
cd videoP2Proxy
Build
./autogen.sh
make
sudo make install
Run the RTSP proxy
videop2proxy --ip CAMERA_IP --token CAMERA_HEX_TOKEN --rtsp 8554

Example output running correctly:

Starting proxy...
Starting RTSP server on "rtsp://192.168.1.2:8554/"
(Using port 8000 for optional RTSP-over-HTTP tunneling.)

[P2P client] starting...
IOTC_Initialize2...
IOTC_Connect_ByUID_Parallel... SID:0
avClientStart2... userName: c8da138df16 passWord: a1c8da1df11a
avClientStart2 mAvIndex=0
startIOTC video ret=0
startIOTC audio ret=0
[P2P client] running
[ReceiveVideo] Running
[ReceiveAudio] Running

Use it with Home Assistant

Simply add to your configuration.yaml

camera:
  - platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://192.168.1.2:8554/

Usage

$ videop2proxy --help
Usage: videop2proxy --ip CAMERA_IP --token CAMERA_HEX_TOKEN [...] 

Options:
  --ip IP             [Required] Camera ip address.
  --token HEX_TOKEN   [Required] Camera miio token.

Modes:
  --rtsp PORT         Enable RTSP server.
  --stdout            Enable output to stdout.
--token [hex_token]

If you don't already have the miio token for your device you can try:

Keep in mind that reseting and re-adding the device to MiHome app will change the token.

Modes:

--rtsp [port]

Starts a rtsp server on the specified port with live video data.

--stdout

Dumps the raw h264 stream to stdout on realtime to allow usage to other programs via linux pipe.

Example use with a webRTC server running janus on a Raspberry Pi

videop2proxy --ip CAMERA_IP --token CAMERA_HEX_TOKEN --stdout \
| gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004

Known limitations

  • The program does not do any additional processing to the raw h264 video feed provided by the P2P camera.Some h264 decoders will like it less than others.
  • Given the nature of the UDP connection for the P2P client, some frames/data will be lost and video may freeze intermittently. It is the expected behaviour. You can only try to improve the network path.
  • This is a fast hack, pull requests welcome.

Was this useful to you? Consider donating
@PayPal: [email protected]
@bitcoin: bc1q2s5jdm7vem8ygv2fgxtfukmxuruyfsqjrexk3c

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].