-
Notifications
You must be signed in to change notification settings - Fork 220
Enable RTSP Server
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.
- Join the Discord Server.
- Go to the channel
#donate
and type "donate". - The Bot will provide a link where you can become a Supporter and receive your license(s). (NOTE: you will need the "camhash" from the "RTSP" section in the camera's web interface.)
- Once the form is complete you will get access to the #supporters channel.
- Download the latest version of the RTSPv4 pack 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"). - 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.
- Download the latest version of viewd and rtspv4 from the Discord #supporters channel (releases should be pinned to the channel)
- Extract the archive, you should now have a
bin
folder which needs to be uploaded to the camera - Connect to the camera via FTP (FileZilla, WinSCP, etc.), look above for username/password
- Browse to
/home/yi-hack-v4
- Upload the
bin
folder, or upload the files insidebin
to the already existingbin
folder - Connect to the camera via SSH (PuttY, WinSCP, etc.)
- Run the following commands:
cd /home/yi-hack-v4/bin
chmod +x rtspv4
chmod +x viewd
- Run the command
camhash
and send the generated hash (among with your username and mail address) via this form License Request for viewd. - 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 [email protected]:/home/yi-hack-v4/etc
- Once done you can start viewd via the command
viewd &
, this will start a daemonized version of viewd. - 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
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!
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
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
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.