Getting RTSP Streams - hi019/vivint.js GitHub Wiki
Vivint provides multiple RTSP feeds for each camera:
- Local: eg
rtsp://PANEL_LOCAL_IP:8554/Video-XX_SD- only reachable via LAN - Global: eg
rtsp://livevid.vivint.com:443/XXXXXXXX/XXXX/Video-XX_SD- reachable from anywhere
To access the feeds, you must go through the Vivint Panel (instead of individual cameras)
How to obtain an RTSP stream
For convenience, I've wrote a script that automatically assembles a RSTP URL with authentication. Here's how to run it.
- Clone vivint.js
- Install dependencies:
npm installoryarn - Open
examples/rtsp-stream.tsand changeusernameandpassword - Run
npx ts-node examples/rtsp-stream.ts(or withoutnpx:node_modules/.bin/ts-node examples/rtsp-stream.ts)
How it works
- Get all panels with
getPanels - Call
getPanelPassword, which calls/api/panel-login/${panelId}and returns a username and password (for the first panel from step 1) that is used for all RTSP feeds - Call
getCameras, then for each camera, add step 2 credentials to the RTSP path incamera.cous(see image) to form a local stream URL - To get the camera's global URL, do the same as the previous step but with
camera.ceu[0]instead ofcamera.cous
Notes
- For me, the IP in
camera.cousdid not exist on my LAN. However, the IP incamera.ciadid. The script should automatically suggestcamera.ciaat the bottom of its output