Giter Site home page Giter Site logo

itrauco / wyzecameralivestream Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fiveleavesleft/wyzecameralivestream

0.0 0.0 0.0 3.9 MB

Hack to allow live streaming from wyze cameras to vlc or mpv on your desktop.

License: MIT License

Shell 1.11% Makefile 0.47% C 98.41%

wyzecameralivestream's Introduction

Wyze Cam Live Streaming

This is a hack to allow live streaming from a wyze cam on your local network.

Installation - New!

The simplest fix for wyze events not being detected was to integrate the stream hack into WyzeHacks so I forked WyzeHacks into https://github.com/FiveLeavesLeft/WyzeHacks and also included the zip file here in this directory.

To install, download the zip file and:

unzip wyze_hacks_0_5_06.zip
cp config.inc.TEMPLATE config.inc
./remote_install.sh

Third-Party Integration/Configuration

Homebridge/HOOBS

Install the Homebridge Camera FFmpeg plugin.

Sample configuration:

    {
        "name": "CAM-NAME",
        "manufacturer": "Wyze",
        "model": "Cam v2",
        "unbridge": true,
        "videoConfig": {
            "source": "-i http://CAM-IP:12345",
            "stillImageSource": "-i http://CAM-IP:12345 -vframes 1 -r 1",
            "vcodec": "copy",
            "maxStreams": 1,
            "audio": false,
            "packetSize": 188
        }
    }

Source: @mrlt8

Enable Motion in Homebridge

  • Configure HTTP Port in Camera FFMPEG
  • Set "motion": true, for your camera in Camera FFMPEG
  • Configure the following script and copy it to your camera (e.g. /media/mmc/scripts/motion.sh):
#!/bin/sh
SLEEP=10
BRIDGE=homebridge-ip:port
CAMERA=camera-name-in-homebridge
while : ; do
    sleep $SLEEP                                       
    [[ ! -f /tmp/*.jpg ]] && continue              
     wget -q -O - "http://$BRIDGE/motion?$CAMERA"
done 

You can auto start the script by calling it from export CUSTOM_SCRIPT= in /configs/wyze_hack.cfg

Source: @mrlt8


Home Assistant

Sample Configuration:

wyzefront:
    ffmpeg:
      # hwaccel_args:
      #   - -hwaccel
      #   - vaapi
      #   - -hwaccel_device
      #   - /dev/dri/renderD128
      #   - -hwaccel_output_format
      #   - yuv420p
      input_args:
        - -avoid_negative_ts
        - make_zero
      inputs:
        - path: http://x.x.x.x:12345
          roles:
            - detect
            - clips
            - rtmp
    width: 1920
    height: 1080
    fps: 5
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person

Source: @romedtino


Blue Iris

Sample Configuration:

  • Make: Generic/ONVIF
  • Model: HTTP Live Streaming (HLS, M3U8), MP2TS
  • Media/video/RTSP port: 12345

config

Source: @dudududodododedede


Installation - ( Old, no longer supported )

Installation currenty requires telnet on the camera. The WyzeHacks github repository will let you install telnet. For details see Telnet.md in this directory.

Telnet to your camera, login in as root, the password is probably ismart12.

telnet <your cam ip>

And once on your camera:

cd /configs
wget crb.users.sonic.net/current/install.sh
chmod +x install.sh
./install.sh

Then reboot or power cycle the camera and try one of these on your desktop:

mpv http://<your cam ip>:12345
    eg. mpv http://192.168.0.124:12345

or

    vlc http://<your cam ip>:12345 --demux h264
    eg. vlc http://192.168.0.124:12345 --demux h264

( On MacOs alias vlc='/Applications/VLC.app/Contents/MacOS/VLC' )

To uninstall

Telnet to your camera and:

cd /configs
wget crb.users.sonic.net/current/uninstall.sh
chmod +x uninstall.sh
./uninstall.sh

Why is it installed from sonic.net and not github?

The version of wget on the camera does not support https.

Known issues

There have been some reports of wyze events not being uploaded to the cloud. This has been addressed but it depended on the firmware version; you can check on your camera by waving your hand in front of the camera and see if the event gets uploaded to the cloud.

How it works:

The hack modifies LD_LIBRARY_PATH and provides an alternative libimp.so.

On V2 cameras, install.sh wraps /system/init/app_init.sh

On V3 cameras, install.sh wraps /configs/wyze_hack.sh

install.sh creates the directory /configs/stream_hack and puts the alternative vesion of libimp.so there.

Toolchain

The toolchain I used is:

https://sourcery.sw.siemens.com/GNUToolchain/release3217

Documentation is here:

https://sourcery.sw.siemens.com/GNUToolchain/doc23862/getting-started.pdf

wyzecameralivestream's People

Contributors

fiveleavesleft avatar mrlt8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.