Skip to content

Instantly share code, notes, and snippets.

@BradMcGonigle
Forked from bakman2/octoprint.md
Last active March 27, 2021 00:43
Show Gist options
  • Save BradMcGonigle/2e56f190a7e1c8ca2afeec2cbd313339 to your computer and use it in GitHub Desktop.
Save BradMcGonigle/2e56f190a7e1c8ca2afeec2cbd313339 to your computer and use it in GitHub Desktop.
Monoprice Mini Delta - collection of useful things

Octoprint with Wyze cam V2

Installation

Install Dafang Hacks on the Wyze Cam.

Once running and all is functional, continue.

If OctoPrint is running on a Raspberry Pi (3B minimum):

ssh pi@<raspberry_ip>
sudo apt update
sudo apt install vlc

VLC will be used to transcode the rtsp stream to a http stream which OctoPrint can use as streaming URL

nano http_stream.sh

paste the following line:

cvlc -R rtsp://<rtsp user>:<rtsp password>@<rtsp ip addr>/live --sout-x264-preset fast --sout='#transcode{acodec=none,vcodec=MJPG,vb=1000,fps=0.5}:standard{mux=mpjpeg,access=http{mime=multipart/x-mixed-replace; boundary=--7b3cc56e5f51db803f790dad720ed50a},dst=:8899/videostream.cgi}' --sout-keep

Change the user:pass@yourwyzecamip to match your camera

CTRL+x to save

chmod +x http_stream.sh
./http_stream.sh

Now you should be able to open your browser:

http://<raspberryip>:8899/videostream.cgi

If it works, you can use this url in OctoPrint for the Stream URL

For the snapshot URL use:

https://<user:pass@wyzecamip>/cgi-bin/currentpic.cgi

Change your user/pass and ip to match your setup Click advanced options and uncheck Validate SSL on snapshot URL (if applicable)

As this process is cpu intensive you will need to play around with the vb=x,fps=x (vb = bitrate, fps = frames per second) options in the cvlc command. These settings work for me, but as I wanted better quality I have this process running on a more powerful device

Other devices

Same steps, but change the vb and fps option if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment