Wyze Cam V2 Support?

The Wyze Cam V2 is a great inexpensive HD WiFi camera. I see no mention of it. Can it be added to Octprint supported?

3 Likes

has any one found a way to do this i feel it would be great

I would also like Wyze cam ingratiation.

Have you tried connecting it and using it? Presumably since it has wi-fi it will behave like other IP-based cameras. Presumably there is a link to view the streaming video.

The Wyzecam doesn't output video via the USB. How would one connect it to a Pi in order to stream video? I'm new to this whole thing. I have a Wyze setup to view my print bed and I use Octoprint. But have to switch between apps.

In theory, one would read the specifications to find out how one fetches the feed. It's often something like http://ipaddress/somepath/?user=whatever&password=whatever . Once you have that, you'd use that in the OctoPrint -> Settings -> Timelapse page to tell OctoPrint to use that.

I just ordered a Wyze V2 and hope to get this working with the RTSP (Real Time Streaming Protocol) firmware release. The Wyze cam hardware is essentially white label from a Chinese manufacturer that Wyze has developed their own firmware and ecosystem around.

A lot of ppl were flashing other firmware onto the Wyze cams to get RTSP and other features so I think it just made sense for them to add the feature. They've also been adding features like Google Home functionality so it made sense to add it.

If you search around you can find links to their page with the RTSP firmware for the V2 and Pan cameras. It has to be flashed onto the camera via USB card but there's a ton of tutorials online.

But as ppl in this post have suggested with RTSP enabled on the Wyze Cam you'll be able to access the stream from the camera via a URL pointing to the camera's IP on your network (from any other device on your network).

That stream should be able to be passed into Octoprint as a camera feed. Not sure how well it'll integrate out of the box. Might take some transcoding? I'm not sure exactly what type of stream octroprint expects. But at $25 the video quality is pretty great. In addition the Wyze app works from anywhere so it should be a good way to get a secure remote glimpse at my printers while I'm away.

I have 5 Wyzecam V2s. Great camera. I use 3 with my MK3S MMU2S to see around the big extruder assembly. Super easy to monitor remotely. Octoprint integration would be perfect.
Someone please make it so and tell me how.
Thank you.

1 Like

Okay I think I got something working!

  1. First step getting the RTSP firmware on your cam.
    Instructions and firmware can be found here -> https://support.wyzecam.com/hc/en-us/articles/360031187371-Wyze-Cam-RTSP

You'll have to setup a username and password which are just put plane text into the url. It'll be something like

rtsp://user:password@wyzeCamIP/live

Copy the generated url that passes out the stream. Test it in VLC by opening a media stream and pasting in the copied URL. Should see the Wyze cam.

  1. (Running on Pi 3B+) Will need ffmpeg/ffserver which should already be installed in OctoPi. If you're using something other than the OctoPi image you might have to install these

Open and edit the ffserver config
sudo nano /etc/ffserver.conf

and setup feeds and streams. I have no idea what the right values will be but here's what I have in mine right now

File /tmp/camera.ffm
</Feed>

<Stream camera.mjpeg>
Feed camera.ffm
Format mpjpeg
VideoFrameRate 6
VideoSize 640x360
VideoBitRate 2048
VideoIntraOnly
NoAudio
Strict -1
</Stream>

<Stream static-camera.jpg>
Feed camera.ffm
Format jpeg
VideoFrameRate 2
VideoIntraOnly
VideoSize 1920x1080
NoAudio
NoDefaults
Strict -1
</Stream>

Save and note the names defining the video stream "camera.mjpeg" and snapshot stream "static-camera.jpg" can be whatever you want

I also had to increase the max bandwidth setting in this file to something like 5000-10000 depending on the bitrate and other settings

  1. Start the ffserver in the background "ffserver &'

  2. Run ffmpeg and have it pipe the rtsp stream into the feed defined in the ffserver config

ffmpeg -rtsp_transport tcp -i 'rtsp://user:password@wyzeCamIP/live' http://127.0.0.1:8090/camera.ffm

You should be able to your pi's ip and view the stream and snapshots in your browser

http://octopiIP:8090/camera.mjpeg

or

http://octopiIP:8090/static-camera.jpg

The part I'm stuck on is sometimes the stream doesn't actually show up in the OctoPrint interface. I can view it straight in my browser pretty consistently. But if I set the stream URL as the stream URL in the Webcam & Timelapse settings or Webcam Sidebar it just doesn't always show up. Sometimes it shows broken image icon. I think it might have to do with whether I use localhost/127.0.0.1 or the actual IP Address. So maybe that has to do with allowing localhost in the ffserver config?

I ran a top to see what CPU usage is with the stream going in my browser and it was REALLY high. Like 120% so the settings can be optimized a lot. I think it'll depend on whether ppl are looking to just have their Wyze cam to monitor or capture timelapses/octolapses. Which would be nice.

1 Like

Looks great. Thank you.
My machine is going for repairs. I will try your solution when it's back.

Is the wyze cam accesible locally using just a browser? If so you could use my plugin below to replace the image on the control tab with an iframe loading the camera's web page. Then you're not re-encoding the stream on the pi, which I believe will introduce some delays/latency in the stream.

I've not seen any way to embed an RTSP stream in a browser without rencoding/transcoding into something like mjpeg. If someone is away of a way it would save a lot of trouble in not having to run additional services.

Ideally I'd love to use the Wyze cam for timelapses and Octolapse. For $25 the image quality is pretty comparable to something like a C920 for ~$70 new

Yeah, I searched a little last night on that very topic and doesn't look like there is a simple way of embedding an rtsp stream, without using vlc or similar activex control (not usable in all browsers) or flash.

I encourage you knowledgable people to find a way. Wyzecam is worth it.

1 Like

I may play with this but it will be roughly the same thing that @SrgntBallistic posted above, but instead of using ffmpeg to configure the server will use motioneye to do all the conversion work. Of course, it's probably using ffmpeg in the background, just a little user-friendlier to add a camera in it's web interface than to deal with all the command-line stuff manually.

1 Like

+1
Hope this gets enough requests so someone can make a reliable plugin