Giter Site home page Giter Site logo

wyzecameralivestream's People

Contributors

fiveleavesleft avatar mrlt8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wyzecameralivestream's Issues

Camera is always on when the Wyze exposed software power button in Wyze app is off

Not reporting a bug but trying to understand the Wyze cam behavior.

It seems that the Wyze camera is always on even when the the software power button in the Wyze app is turned off. This is because the with the homebridge integration, I can see the live camera shot and the live streaming even when it is off from the Wyze app perspective.
So the only thing that is really off is motion/sound detection and therefore any recording of it. But the camera itself is always on and seeing the world. Would that be right thing to say?

Synology Surveillance Station Integration

Hi, I'm trying to integrate the streaming hack into Synology Surveillance Station but for some reason it does not work:
I configure the Camera as "Streaming - HTTP". When it tests the connection, it fails everytime. The "stream_hack.log" file on the camera prints the following:

CRB: Waiting...
CRB: Accept...
CRB: New client: 192.168.1.5
CRB: Client said: 'GET / HTTP/1.0
User-Agent: Synology Surveillance Station
Auth'
CRB: read failed, stopping client
CRB: New client finished.
CRB: connfd == client_fd
CRB: Waiting...
CRB: stream write error:No such file or directory
CRB: shut down client

Any idea how to get it to work?

Thanks in advance!

rasp stream is skipping frames

When I use the Wyze iOS app, the live stream is smooth but with the stream hack installed, the rtsp stream using VLC on macOS seems to skip frames. I have v3 with the latest 4.36.0.280 firmware installed. I also see the following errors on the console...

VLC media player 3.0.11.1 Vetinari (revision 3.0.11.1-0-g52483f3ca2)
[00007fe39f704310] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007fe39f676f20] h26x demux error: this doesn't look like a h264 ES stream, continuing anyway
2021-04-28 10:44:48.747 VLC[2619:42540] Can't find app with identifier com.apple.iTunes
2021-04-28 10:44:48.844 VLC[2619:42540] Can't find app with identifier com.spotify.client
[00007fe3a2c82ea0] videotoolbox decoder: Using Video Toolbox to decode 'h264'
[00007fe3a2c82ea0] videotoolbox decoder: vt cvpx chroma: 420v
2021-04-28 10:44:51.365 VLC[2619:42540] Can't find app with identifier com.apple.iTunes
2021-04-28 10:44:51.435 VLC[2619:42540] Can't find app with identifier com.spotify.client
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1000 ms)
[00007fe3a2c82ea0] main decoder error: buffer deadlock prevented
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1230 ms)
[00007fe3a2c82ea0] main decoder error: buffer deadlock prevented
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 2001 ms)
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 4497 ms)
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 4547 ms)
[00007fe3a2314700] bonjour renderer discovery: starting discovery
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 4824 ms)
[00007fe3a2314700] bonjour renderer discovery: stopped discovery
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 4927 ms)
[00007fe3a08ef4f0] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 5194 ms)

No audio/sound in stream?

I installed the firmware on a v3 cam and everything works great (I can stream to VLC) but no audio is coming through. I verified in VLC that 0 audio bytes/second are being received (so it's not an issue of volume being too low). The audio works just fine when viewing through the official Wyze phone app

demo.bin

Is there any reason we wouldn't want to rename firmware.bin to demo.bin, stick it in the root of a sdcard, and boot?

homebridge configuration

While I could see the RTSP stream on macOS with VLC, my hoobs based home bridge installation is not working. Can you provide the homebridge-ffmpeg configuration that you used to stream the camera to HomeKit.

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?

mp4s not saving to SD card

Hi Charlie, found another SD related bug.

I noticed that I wasn't getting any recording under the "View Playback" section of the wyze app, so I took a look at the SD card and could see the folders for each of the days in /media/mmc/recordings/ were being created, but had some weird characters at the end:

47.9M   /media/mmc/record/20210503
16.0K   /media/mmc/record/20210506?w
16.0K   /media/mmc/record/20210507?w

Got the same result after formatting the card:

16.0K   /media/mmc/record/20210507Ew
16.0K   /media/mmc/record/20210507Yw
16.0K   /media/mmc/record/20210507lw

Replicated the issue on a couple of other cameras as well.
The folders normally have a %Y%m%d format, but for some reason they are getting a random character + w at the end of the directory name.

The files in /alarm and /time_lapse seem unaffected and are getting created normally.

Better than RTSP firmware

This http stream works much better on NVR Frigate with person detection than their new RTSP firmware.

Keep it live pls

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.

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

Reduce cool down time or trigger custom script?

Not sure if this is in the scope of stream hack, but I believe there are some motion related stuff in libimp.so..?

I'm currently using the stream hack with homebridge-camera-ffmpeg and a custom script which monitors the /alarm folder on the SD card and will trigger a "motion" even in HomeKit whenever a new image is detected. It works surprisingly well and allows the cams to be used as pseudo motion sensors to trigger scenes/light or even do a HomeKit notification with preview.

However, the /alarm folder seems to suffer from the 5 min cool down (reason why I was trying to use the events in the /record folder).
Is there any way to reduce the cool down for /alarm or trigger a custom script whenever the camera detects motion?

app_init.sh not linked to wyze_hack.sh?

I was trying to disable the stream_hack to debug an issue and noticed that editing /configs/wyze_hack.sh did not do anything.

Any particular reason why /system/init/app_init.sh is not a symbolic link to /configs/wyze_hack.sh like the standard WyzeHacks install.

Continuous reboots on v3 camera firmware 4.36.1.4

I tried to install this on for v3 camera with firmware 4.36.1.4 and the camera reboots after 15 to 20 seconds on restart. That was enough time for me to upload uninstall.sh script (after a couple of retries) and run it. The WyzeHack by itself seems to run just fine as I can telnet into the camera and see NFS mounts etc.

I can retry installing it, but would like to know if I should enable some debug or such to identify the issue.

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

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?

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?

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.

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

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

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.

RTSP stream

Is it possible to get a straight RTSP stream directly from the camera?

I'm able to view the stream with VLC, but cannot consume it on my NVR.

Can't view stream on VLC or MPV

I have a WC3 set up with the hacks, I can ping it, do a port scan and see ports 23 and 12345 open.

Cannot view the stream with either
VLC nothing
MPV (MPV throws some weird error about youtube-dl??)

Also tried to add it in Blue Iris. I add the IP in the right field, hit "inspect" after changing RTSP port to 12345.
Tells me it finds RTSP port, it "self configures" but no stream.
Tried both http and rtsp in the drop down.

If anyone has any ideas what I can try would appreciate it. I turned off Windows firewall to try, no difference.

Thanks

[tried to telnet with root, password listed in docs ismart12 doesn't work...)

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?

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.

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...

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.