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.

  1. Clone vivint.js
  2. Install dependencies: npm install or yarn
  3. Open examples/rtsp-stream.ts and change username and password
  4. Run npx ts-node examples/rtsp-stream.ts (or without npx: node_modules/.bin/ts-node examples/rtsp-stream.ts)

How it works

  1. Get all panels with getPanels
  2. 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
  3. Call getCameras, then for each camera, add step 2 credentials to the RTSP path in camera.cous (see image) to form a local stream URL
  4. To get the camera's global URL, do the same as the previous step but with camera.ceu[0] instead of camera.cous

Notes

  • For me, the IP in camera.cous did not exist on my LAN. However, the IP in camera.cia did. The script should automatically suggest camera.cia at the bottom of its output