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

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

Comments
  • Stream disconnects when V3 is blocked from accessing the internet

    Stream disconnects when V3 is blocked from accessing the internet

    Not sure if this is specific to the streaming library but I've noticed that if I prevent the V3 from accessing the internet after about an hour the stream stops and I can no longer connect to it.

    I can still ping the camera and it seems to continue to record to the SD card. If instead I allow the V3 to access the internet the stream seems to work indefinitely.

    Is it possible to use the live stream and also keep the V3 off the internet?

  • Trying to install on v3 cam firmware version 4.36.0.280

    Trying to install on v3 cam firmware version 4.36.0.280

    Been trying to install this onto my v3 cam but it doesnt seem to work. I never hear the camera say "installation begins" like the directions say. After i click yes on my camera it just presents a bunch of dots .............. and my camera blinks blue/red/purple until i press CTRL+C. Ive left it in this state for about 30m and it still never did anything. Any help?

  • Error trying to run install script

    Error trying to run install script

    Trying to install this on a WyzeCam3 [wyze_hacks_0_5_06.zip] Ubuntu 18.04 Made sure Python3 installed Made sure python-pip installed

    When I try to run ./remote_install.sh I get this.

    Found local config file, including into firmware update archive... Upgrade/config.inc /usr/bin/python3: No module named pip Traceback (most recent call last): File "./wyze_updater.py", line 294, in help='Supported actions') File "/usr/lib/python3.6/argparse.py", line 1716, in add_subparsers action = parsers_class(option_strings=[], **kwargs) TypeError: init() got an unexpected keyword argument 'required'

    Help would be appreicated

  • Not compatible with BlueIris

    Not compatible with BlueIris

    I have no issues viewing the feed in VLC with "vlc http://192.168.0.225:12345 --demux h264" However BlueIris doesn't seem to play well with the stream

    This is my configuration:

    192.168.0.202 - BlueIris 4.8.4.7 x64 192.168.0.225 - Wyze Cam v3

    config

    BlueIris says "No signal"

    the stream_hack.log is looping with this:

    CRB: Waiting... CRB: Accept... CRB: New client: 192.168.0.202 CRB: read failed, stopping client CRB: New client finished. CRB: Waiting... CRB: Accept... CRB: New client: 192.168.0.202 CRB: read failed, stopping client CRB: New client finished. CRB: Waiting... CRB: Accept... CRB: New client: 192.168.0.202 CRB: read failed, stopping client CRB: New client finished. CRB: Waiting... CRB: Accept... CRB: New client: 192.168.0.202 CRB: read failed, stopping client CRB: New client finished. CRB: Waiting... CRB: Accept... CRB: New client: 192.168.0.202 CRB: read failed, stopping client CRB: New client finished. CRB: Waiting...

  • Can't install on 4.36.3.18

    Can't install on 4.36.3.18

    Howdy, and thanks for this software. I'm trying to install this on my v3 with 4.36.3.19 installed. I don't think it's able to install over newer firmware (the dots just keep running in the installer ......, after 20 minutes I thought it was safe to ctrl + C out). The wyze app shows the camera working, and showed a firmware update - from 4.36.2.5 to 4.36.3.18.

    No ports appeared open on the camera (no TCP ports, there were about 8 UDP ports open - definitely no 23 Telnet, no 12345 either) so I'm guessing the camera just rolled back to it's default firmware - or am I doing something wrong, or I'm not installing it correctly? Do I need an sd card installed in the camera perhaps? Thanks for any advice offered.

    I then stupidly completed the Wyze firmware update 4.36.2.5 to 4.36.3.18, which then prompted to install 4.36.3.19, which I did. Attempting to install your custom firmware results in the firmware now staying at 4.36.3.19. I believe the newer firmware is locked down and denies 'rolling back' to custom firmware. Perhaps I need to try an SD card update?

  • SD card not mounting with LiveStream hack

    SD card not mounting with LiveStream hack

    Hi Charlie, I noticed the wyze app was saying that the camera did not have an SD card installed, and was able to confirmed that nothing was being mounted to /media/mmc.

    I can see my SD card in /dev/mmcblk0p1 and was able to manually mount it to /media/mmc, but it still doesn’t get notice by the app or persist on reboot.

    SD card does get mounted/recognized on the latest vanilla wyze_hacks. Same issue on two cams with the stream_hack installed.

  • Wyze not detecting motion when hack is enabled

    Wyze not detecting motion when hack is enabled

    Camera firmware: 4.9.6.241 No Wyze Cam Plus subscription.

    Direct stream from camera and live view on the Wyze app work great, but motion tagging (green box around motion) is not working and motion events are not getting uploaded to the Wyze cloud when the hack is enabled.

    Disabling the hack by commenting out the LD_LIBRARY_PATH in /system/init/app_init.sh restores the motion tagging and Wyze cloud events.

  • Trouble installing

    Trouble installing

    Hello and thanks for putting this thing together!

    I'm having some trouble installing the new hack.

    I believe the install.sh from sonic.net is trying to pull the libimp.so from GitHub so it fails since wget on the camera doesn't support https.

    I commented out the GitHub link and it seems to install, but then the camera doesn't come back up after a reboot (solid orange light).

    Here's the install log:

    + STREAM_HACK_OUTPUT=/tmp/stream_hack.log
    + [ -z  ]
    + WYZE_APP_OUTPUT=/dev/null
    + [ -z /tmp/stream_hack.log ]
    + [ -z  ]
    + STREAM_HACK_VERSION=current
    + [ -z  ]
    + STREAM_HACK_LIB=crb.users.sonic.net/current/libimp.so
    + dir=/configs/stream_hack
    + rm -rf /configs/stream_hack
    + mkdir /configs/stream_hack
    + wget -O /configs/stream_hack/libimp.so crb.users.sonic.net/current/libimp.so
    Connecting to crb.users.sonic.net (209.204.190.65:80)
    libimp.so            100% |****************************************************************************************************************************| 27780   0:00:00 ETA
    + [ -w /configs/wyze_hack.sh ]
    + wrap /configs/wyze_hack.sh
    + grep stream_hack /configs/wyze_hack.sh
    + echo #!/bin/sh
    + echo export LD_LIBRARY_PATH=/configs/stream_hack:$LD_LIBRARY_PATH
    + echo export STREAM_HACK_PORT=
    + echo export STREAM_HACK_P2P=
    + echo export STREAM_HACK_OUTPUT=/tmp/stream_hack.log
    + echo /configs/wyze_hack.sh.orig >& /dev/null &
    + chmod +x /configs/wyze_hack.sh /configs/wyze_hack.sh.orig
    chmod: /configs/wyze_hack.sh.orig: No such file or directory
    + grep -w -c ro
    + grep -w /system /proc/mounts
    + system_read_only=0
    + [ -w /system/init/app_init.sh ]
    + [ 0 == 0 ]
    + wrap /system/init/app_init.sh
    + grep stream_hack /system/init/app_init.sh
    + echo #!/bin/sh
    + echo export LD_LIBRARY_PATH=/configs/stream_hack:$LD_LIBRARY_PATH
    + echo export STREAM_HACK_PORT=
    + echo export STREAM_HACK_P2P=
    + echo export STREAM_HACK_OUTPUT=/tmp/stream_hack.log
    + echo /system/init/app_init.sh.orig >& /dev/null &
    + chmod +x /system/init/app_init.sh /system/init/app_init.sh.orig
    chmod: /system/init/app_init.sh.orig: No such file or directory
    + echo Stream hack installed.
    Stream hack installed.
    
  • ~1s steaming latency on V3+VLC

    ~1s steaming latency on V3+VLC

    Hey there, thank you for this wonderful work!

    While testing this out with VLC, it appears to have about 1s latency from camera to VLC.

    Do you happen to know the cause of this? The IMP_Encoder_GetStream -> crb_tcp_hook path seems reasonable to me and I don't see any buffers there (and it seems to run off the encoder thread?). I am suspicious that this is VLC buffering things too aggressively, as the app-based streaming seems faster.

  • New issue trying to run ./remote_install.sh, bunch of errors and Broken Pipe..

    New issue trying to run ./remote_install.sh, bunch of errors and Broken Pipe..

    I had this working before, but today I wanted to add this to 2 more cameras and I'm getting these errors below, ending in Broken Pipe....

    Can someone tell me what could be the issue with this?

    wc3

  • Blue Iris

    Blue Iris

    Thanks for putting this together!

    Not really an issue, more of a question.
    I got the stream working on a v3 with both vlc and mpv. Now trying to feed the stream into Blue Iris. Any idea how to configure a BI camera to accept the h264 stream?

  • Please update Stream Hack to work with latest wz_mini_hack

    Please update Stream Hack to work with latest wz_mini_hack

    Just tested the new wz_mini_hack and it works great, you can get SSH root access on latest FW. https://github.com/gtxaspec/wz_mini_hacks but the original installation is not working cd /configs wget crb.users.sonic.net/current/install.sh chmod +x install.sh ./install.sh

  • Issues with V3 4.36.8.15 firmware

    Issues with V3 4.36.8.15 firmware

    With Wyze forcing all cams to update to the latest firmware by end of January, I went ahead and bit the bullet and am updating to 4.36.8.15 on my V3 cams. The good news is that WyzeCameraLiveStream still works with it, sometimes. There are a few things that can happen when you enable the hack:

    1. The cam will refuse it and might go into a boot loop until you disable it
    2. Sometimes the cam does not reboot, and so using VLC will allow me to see the video feed as usual, except now you can't view it on the Wyze app

    I believe the rootfs is updated from when this hack was created so that may or may not have something to do with it.

  • New Installation?

    New Installation?

    As of December 28 2021 the WyzeCameraLiveStream still works

    just downgraded from RTSP firmare to 4.36.0.228

    installed DNS server using Dnsmasq following this guide: dnsmasq spoofing

    my dns server: 192.168.1.245 ( raspberry pi 4 using raspbian lite ) running script: 192.168.1.143 ( Ubuntu in VM ) here I installed wyze_hacks_0_5_08.zip

    run dnsmasq or some other DNS server and spoof s3-us-west-2.amazonaws.com to the computer you will run the script from. In my case, I used a rasbperry pi for dns serving. This involved (1) adding a line to hosts of s3-us-west-2.amazonaws.com 192.168.11.4 (2) changing the DNS server choice on the DHCP server to the ip of your spoofing DNS server (in my case 192.168.11.11)

    image

    Manually set the url inside the to http://s3-us-west-2.amazonaws.com/wuv2/upgrade/WLPP1/firmware/1.2.0.80a.bin

    image

    The port used must be port 80 (since it's checking urls I doubt it will work with another port). Note that the default port if you use remote_install.sh is not 80 On OSX, I had to use sudo to avoid getting "PermissionError: [Errno 13] Permission Denied"

    Flashing command: sudo python3 ./wyze_updater.py --token ~/.wyze_token --debug update -m WYZEC1-JZ -m WYZECP1_JEF -m WYZE_CAKP2JFUS -m WYZEDB3 -f ./firmware.bin -p 80

    image

  • Alternative install

    Alternative install

    WYZE blocked wyze_hack scripts (read about it here) and made getting the wyze_hack fw much difficult (you need DNS spoofing). I was able to get the wyze_hack fw on my V3 camera and I can telnet to the camera. Can I manually install using the new install script? on my camera running system_read_only=$(grep -w /system /proc/mounts | grep -w -c to)
    gets system_read_only= 1 so I need only to wrap /configs/wyze_hack.sh and get the new libimp.so

    Is that correct?

🎥 mpv is a free (as in freedom) media player for the command line.
🎥 mpv is a free (as in freedom) media player for the command line.

mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types.

Nov 25, 2022
Plugin for VLC that pauses/plays video on mouse click

Pause Click plugin for VLC VLC plugin that allows you to pause/play a video by clicking on the video image. Can be configured to work nicely with doub

Nov 29, 2022
TIP (translate it, please) is a plugin for VLC media player that helps you to study languages by watching videos.

vlc-tip-plugin TIP (translate it, please) is a plugin for VLC media player that helps you to study languages by watching videos. Features The plugin a

Oct 11, 2022
A bittorrent plugin for VLC.

vlc-bittorrent (Bittorrent plugin for VLC) What is this? With vlc-bittorrent, you can open a .torrent file or magnet link with VLC and stream any medi

Nov 25, 2022
Even newer Custom Firmware for Xiaomi Cameras based on Hi3518ev200 Chipset. It includes free RTSP, ONVIF and other improvements based on the work by roleoroleo
Even newer Custom Firmware for Xiaomi Cameras based on Hi3518ev200 Chipset. It includes free RTSP, ONVIF and other improvements based on the work by roleoroleo

Why this Yi-Hack-V5 firmware? The answer is simple: missing updates, RTSP and not based on the latest stock firmware (which features improvements and

Dec 2, 2022
A RTSPServer for RTS3903N based IP Cameras (Yi Camera Inspired)

RTSPServer for RTS3903N based YI Cameras While this repo is focused on Yi based cameras, it should compile and run on any RTS3903N based camera! Backg

Nov 23, 2022
Sample Project that I'm trying to build on YouTube (Live)

GTK-Project Sample Project that I'm trying to build on YouTube (Live) Streams discussing this: S.No. Date Title Limk 1 30/08/2021 Code Along: Building

Mar 18, 2022
Program for IP TV streaming on the network via HTTP

msd Rozhuk Ivan [email protected] 2011 - 2021 msd - Multi stream daemon. Program for organizing IP TV streaming on the network via HTTP. Licence BSD

Nov 23, 2022
a simple example of video streaming with a ESP32 AI Thinker
a simple example of video streaming with a ESP32 AI Thinker

esp32-video-streaming its a simple camera system that im trying to make for fun I want to make an async server but idk it doesnt works correctly and w

Mar 9, 2022
OvenMediaEngine (OME) is a Streaming Server for Sub-Second Latency. It supports WebRTC, RTMP, SRT, MPEG-2 TS, RTSP as input, WebRTC, LL-DASH, MPEG-DASH, HLS as output.
OvenMediaEngine (OME) is a Streaming Server for Sub-Second Latency. It supports WebRTC, RTMP, SRT, MPEG-2 TS, RTSP as input, WebRTC, LL-DASH, MPEG-DASH, HLS as output.

OvenMediaEngine (OME) is a Streaming Server for Sub-Second Latency. It supports WebRTC, RTMP, SRT, MPEG-2 TS, RTSP as input, WebRTC, LL-DASH, MPEG-DASH, HLS as output.

Nov 24, 2022
Video stabilization is a software-based approach in real-time to eliminating environmental effects (wind, heavy vehicle etc.) and enhance the visual performance that degrade video streaming quality.
Video stabilization is a software-based approach in real-time to eliminating environmental effects (wind, heavy vehicle etc.) and enhance the visual performance that degrade video streaming quality.

Video Stabilization Contents General Info Installation To Do General Info Video stabilization is a software-based approach in real-time to eliminating

Nov 23, 2022
Smartstreaming is a high-performance and scalable streaming media server.

1. introduction Smartstreaming is a high-performance and scalable streaming media server. 2. design | io | Coroutine | | transport | tcp/udp/srt/quic

Jan 7, 2022
Console based Streaming Music Player [W.I.P]

?? quanta It's a command line music player that can streams same music to multiple devices, hence creating a surround sound system. Or just use it as

Jan 27, 2022
Jellyfin Desktop Client based on Plex Media Player
Jellyfin Desktop Client based on Plex Media Player

Desktop client using jellyfin-web with embedded MPV player. Supports Windows, Mac OS, and Linux. Media plays within the same window using the jellyfin-web interface unlike Jellyfin Desktop. Supports audio passthrough. Based on Plex Media Player.

Nov 30, 2022
Vita Recorder is a plugin that allows to record video clips during your play sessions.

Vita Recorder Vita Recorder is a plugin that allows to record video clips during your play sessions. The code is based off VITA2PC at which has been a

Nov 8, 2022
⏺️ A simple recording program with the ability to record screens and audio on your computer.
⏺️ A simple recording program with the ability to record screens and audio on your computer.

⏺️ A simple recording program with the ability to record screens and audio on your computer.

Nov 14, 2022
Restream your stream to multiple destinations

RTMP Restreamer Portable RTMP restreaming tool. Starts server, accepts any stream and restreams it to multiple destinations without reencoding. Usage

Feb 14, 2022
Minimalist video maker -- simplify your music score video making process!

VisualScores 极简视频制作程序,简化你的乐谱视频制作! 如果需要编译,请解压 lib 文件夹中压缩包。 使用前请参考 manual 文件夹中的用户手册。 请勿修改、移动或删除 resource 文件夹中的任何文件。 VisualScores Minimalist video maker

Sep 7, 2022
Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.

An open source video game library manager and launcher with support for 3rd party libraries like Steam, GOG, Origin, Battle.net and Uplay. Includes game emulation support, providing one unified interface for your games.

Dec 2, 2022