Skip to content

Enable RTSP Server

nicmorais edited this page May 15, 2019 · 9 revisions

Installing VIEWD and RSTPv4

Viewd in combination with rtspv4 is used to get a functioning RTSP stream from the camera. This is useful for viewing the camera's stream on VLC or to connect the camera to your own security server, for example.

NOTE: viewd is currently closed source donationware and can't be compiled. This is mostly to prevent others from monetizing this function, for example Chinese sellers selling pre-hacked cameras and such. Sadly those exist... Keep in mind that you don't have to donate insane amounts! A single year of Yi-Cloud subscription already costs ~40$, to put things into perspective.

Preparation:

  1. Join the Discord Server.
  2. Go to the channel #donate and type "donate".
  3. The Donate Bot will generate a link with your personal page to become a Supporter.
  4. Get access to the #supporters channel.

Steps:

  1. Open a browser and connect to the camera's web interface.
  2. Click on the "RTSP" section to get the "camhash".
  3. Request a license by sending the camhash via this form: License Request for viewd. (NOTE: If you already have a license for an older version you can skip this step and use it).
  4. Download the latest version of viewd and rtspv4 from the Discord #supporters channel (releases are pinned to the channel). It should be named rtspv4__vX.X.X.7z (with numbers instead of "X").
  5. Upload both files via the camera's web interface.

Once done, the RTSP configuration will come up and after a reboot you will be able to view the stream.


Old Method (Firmware v0.1.1 or older):

Steps:

  1. Download the latest version of viewd and rtspv4 from the Discord #supporters channel (releases should be pinned to the channel)
  2. Extract the archive, you should now have a bin folder which needs to be uploaded to the camera
  3. Connect to the camera via FTP (FileZilla, WinSCP, etc.), look above for username/password
  4. Browse to /home/yi-hack-v4
  5. Upload the bin folder, or upload the files inside bin to the already existing bin folder
  6. Connect to the camera via SSH (PuttY, WinSCP, etc.)
  7. Run the following commands:
cd /home/yi-hack-v4/bin
chmod +x rtspv4
chmod +x viewd
  1. Run the command camhash and send the generated hash (among with your username and mail address) via this form License Request for viewd.
  2. You'll receive a viewd_xxxxxxxx.lic file which you have to copy to /home/yi-hack-v4/etc in order to continue.
  • On Linux/Mac, you can use scp to upload the files. e.g. scp viewd_xxxxxxxx.lic root@192.168.1.150:/home/yi-hack-v4/etc
  1. Once done you can start viewd via the command viewd &, this will start a daemonized version of viewd.
  2. Now use rtspv4 to start the RTSP server

You can now use the displayed URL to connect to the camera via VLC or any other software supporting RTSP-Streams:

  • In VLC, go to Media > Open Network Stream (ctrl+N) and insert in the URL.

e.g. for low resolution streams: rtsp://192.168.0.159/ch0_1.h264

e.g. for high resolution streams: rtsp://192.168.0.159/ch0_0.h264

  • mpv and ffplay are nice options as well:

mpv rtsp://192.168.0.159/ch0_1.h264 or

ffplay rtsp://192.168.0.159/ch0_1.h264

Autostart for VIEWD and RSTPV4

If you don't want to connect via SSH to manually start the RTSP stream you can enter one of the below mentioned commands to autostart those programs. There are a few different versions you can choose from, one High quality stream and one Low quality stream. Choose the one you think is acceptable for you and then run the commands.

NOTE: Make sure to follow the above mentioned "Installing VIEWD and RSTPV4", else this won't work!

HD STREAM ONLY

echo "viewd -S -D --no-lowres" >> /home/yi-hack-v4/script/system.sh
echo "rtspv4 -S -D --no-lowres" >> /home/yi-hack-v4/script/system.sh

SD STREAM ONLY

echo "viewd -S -D --no-hires" >> /home/yi-hack-v4/script/system.sh
echo "rtspv4 -S -D --no-hires" >> /home/yi-hack-v4/script/system.sh

HD AND SD STREAMS (not recommended)

echo "viewd -S -D" >> /home/yi-hack-v4/script/system.sh
echo "rtspv4 -S -D" >> /home/yi-hack-v4/script/system.sh

Once done you should be able to view the RTSP stream after a few seconds when booting up the camera.


You can’t perform that action at this time.