# Video

The Syrus 4G is capable of recording videos based on when an event occurred, as well as maintain a history of videos based on your own conditions.

General Overview

  • The way it works is that you obtain a camera that supports ONVIF protocol
  • Access the web interface of the camera to modify the network configuration so Syrus can connect to it (set a static IP, user, pass, etc)
  • Use the Syrus 4 Management Tool UI to configure the parameters of the camera
  • Fine tune any additional settings on the camera and install

# Features

There are 3 main features Syrus 4 is capable of achieving with video cameras:

  1. Continuous recording, or history mode
  2. Event based video clips with a time window
  3. Stream real time video

Continuous recording, History mode

The apx-video system tool can be used to start and stop recording on up to 3 cameras simultaneously.

The videos are recorded in 10 second clips and are stored either locally under: /data/users/syrus4g/video/ or some folder under media if you are using an external SD card: /media/somefolder/.

You can navigate to the external SD card using the File Explorer on the Management UI.

External SD card

The structure of the folder looks like this:

The video files are created with the name of the camera followed by a numeric ID for the video. The numeric IDs start at 1 and go up to the maximum number of videos it can record depending on the size allocated.

├── history/
│   ├── CAM_NAME_RED/
│   ├── CAM_NAME_BLUE/
│   │   ├── CAM_NAME_BLUE_1.mp4
│   │   ├── CAM_NAME_BLUE_2.mp4
│   │   ├── ...
│   │   ├── ...
│   │   └── CAM_NAME_BLUE_####.mp4

The size allocated (and location) for the camera to be able to store data is defined when you configure it on the Management tool (apx-video add command).

Once the videos reach the maximum size allocated the IDs are repeated and the oldest videos are overwritten.

To get an idea of the maximum amount of time you can record for, the max size of a 10sec clip is 3.75MB for FHD, 2.5MB for HD, and 1.7MB for SD. If you're constantly recording clips of these sizes, the maximum number of clips possible in a day are 8640, giving us a maximum daily size of:

  • 32GB for FHD
  • 22GB for HD
  • 15GB for SD

Syrus 4 has 300MB of internal storage allocated for videos, but you can expand it using an SD card. Here is a breakdown of the storage and duration of video clips.

Quality Storage Duration
FHD (1080p) 512GB SD Card ~16 days (288 hours)
HD (720p) 512GB SD Card ~23 days (558 hours)
SD (480p) 512GB SD Card ~34 days (819 hours)
FHD (1080p) 256GB SD Card ~8 days (144 hours)
HD (720p) 128GB SD Card ~6 days (138 hours)
SD (480p) 64GB SD Card ~4 days (102 hours)
HD (720p) Internal storage 300MB ~20 min or 120 clips

For more information on SD cards check out our FAQ page.

Event based video clips

The apx-video system tool has a command to create a video clip create_clip.

The video clip it creates can have a time window of time before and time after the command is sent that it gets the recording for. Essentially giving us the ability to simulate what ocurred during an event by doing a playback leading up to the event and after it.

Using Syruslang you can trigger events that accomplish this feature.

# capture a video clip 20 seconds before a forward collision and 20 seconds after it
define action forward_collision_video trigger=@accelerometer.forward_collision.signal create video --name={{$gnss.timestamp}}_forward_collision --time_win=-20,+20

The video clips created are stored under a folder given by the name of the clip: /data/users/syrus4g/video/events/CLIP_NAME/VIDEO_CLIP_CAM_NAME.mp4

├── history/
├── events/
│   ├── COLLISION/
│   │   ├── COLLISION_CAM_NAME_RED.mp4
│   │   ├── ...

Since the events are actually a copy of the video clips created, Syrus is continually recording videos.

Video streaming

Syrus 4 uses RTSP in order to stream videos. To get the RTSP address you'll want to go through the guide below to add a camera, and download it's settings to get the stream URI.

Download settings


Once you have the URI you can use a video client like VLC Player to start the stream. Note that the stream will only be available locally on the same network as your streaming video client (VLC) unless you expose the Syrus 4's ip and port to the public internet, once the IP and port are available on a public IP you can remotely stream the video.

Connect stream

Sending videos to remote servers

Check out our LFTP tutorial on the Bash/Shell scripting page for information on how to upload and sync videos with a remote server.

# Installation

The installation of the cameras depends on the type of camera selected, but there are generally 3 ways to connect to cameras:

  1. Ethernet
  2. Wi-Fi or Hotspot
  3. USB

Note that some options are incompatible with each other. For example, most dashcams provide a hotspot for a device to connect to it, so you can't have Syrus connect to both the dashcam and a separate IP cam, but you could connect to a dashcam and a separate camera via ethernet or USB for example.

Take a look at the following diagrams that explain the different scenarios.

IP Camera & Ethernet
Video Profile 1
Hotspot (dashcam) & Ethernet
Video Profile 3
IP camera & Hotspot
Video Profile 4

# Configuration

There are some general configuration settings to keep in mind when adding a camara to the Syrus. In general what we have to do is:

  • Connect to the management interface of the camera
  • Enable ONVIF protocol and port
  • Set a fixed/static ip address to the camera
  • Set a user/password to have access to the camera
  • Optional: disable the time sync on the camera

To demonstrate the steps described above we'll show the steps for the configuration of two cameras, the first one is a Hikvision camera, and the second one a generic one from Alptop.

# Guide: Dome camera via WiFi

Camera used DS-2CD2543GO-IWS (opens new window)

Hikvision Camera

Start by connecting the camera and entering the default settings in your web browser to access the web management UI of the camera. Some manufacturers provide software that show the default network info of the camera, here's an example guide with the steps (opens new window), from there you can update the IP address of the camera so that it connects to your local network.

# Network Basic Settings (LAN)

Once you have local access to the camera, disable any DHCP and set the IP address of the camera to a fixed static IP.

Hikvision Network LAN

# Syrus 4 Hotspot

To connect to the camera we'll have to enable the hotspot of the Syrus 4 with an SSID and Password.

Syrus 4 Hotspot

For example: SSID: Syrus4G-02669 Password: 12345678

# Network Advanced Settings (Wi-Fi)

Go to the advanced network settings of the camera and enable the Wi-Fi. For the SSID and Key use the values from the previous step.

Hikvision Network Wi-Fi

# Network Basic Settings (WLAN)

The WLAN settings have the IP address information that the camera will have when it connects to the Syrus 4G's hotspot. We will need to configure this IP address on the Syrus 4 when we add it as a camera configuration.

Hikvision Network WLAN

# Enable ONVIF Protocol

Make sure to enable the ONVIF protocol and create a user if applicable.

Hikvision Enable ONVIF

Hikvision Admin User

# Add Camera Config on Syrus

Finally, add the camera to the Syrus via the management tool UI using the IP address of the WLAN set up above, including the user / pass to access the camera.

Note that the user and password you enter here are not necessarily related to ONVIF, they can be general user/pass to access the camera. To be sure enter one of them, press SAVE and go to the monitor tab.

Also note that if the ONVIF Port is not specified you can set it to 0.

Camera Added

If you are using an external SD card to store the videos you'll want to select it on the Storage.


# Advanced Configuration of Video

The following settings are advanced and they get into the recommended configuration for the camera.

Hikvision Network

# Optional: Image

Optionally you can set the camera name so that it displays on the screen.

Hikvision Network

Once you have finished provisioning the camera you can synchronize the settings with other cameras using SyrusCloud, or create a SyrusLang script to start video recording.

# Adding audio

To enable audio recording make sure you go to the Video type option on the configuration and select Video&Audio

Hikvision Video Type

Hikvision Audio settings

# Guide: Bullet camera via WiFi

Camera used Alptop AT-200BW (opens new window)

To access the management interface use the following guide (opens new window).

# Network Settings

Configure the static IP address.

Alptop Network

# ONVIF Enabled

Enable the ONVIF protocol.

ONVIF enabling

# User Access

Enable the user access.

User access

# Configure on Syrus

The configuration of the above camera on the Syrus will look like this:

Camera Added

Follow the steps below to configure the camera settings remotely on SyrusCloud and use SyrusLang to create conditions to record videos.

# Adding audio

To enable audio recording make sure you go to the Audio settings and select the following options:

Alptop Audio Settings

# SyrusCloud Sync

Once you have added the configuration of the camera on the Syrus, download the settings from the Video -> Configuration tab, and upload it to SyrusCloud so it can be synchronized across your devices.

# Syruslang Scripting

The SyrusLang video section gives you commands to start recording and create video clips based on any signal.

For example, we could start and stop video recording based on the ignition status.

# signal to detect ignition ON after 10 seconds
define signal ignition min_duration=10sec $io.ign

# action to start video recording on all cameras
define action start_recording trigger=ignition start recording

# action to stop video recording when the ignition is OFF
define action stop_recording trigger=ignition,not stop recording

you can also create video clips based on any combination of signals

# capture video 20 seconds before and 20 seconds after hard braking is detected
define action hard_brake trigger=@accelerometer.hard_braking.signal create video --name={{$gnss.timestamp}}_hard_braking --time_win=-20,+20

# capture video 10 seconds before and 15 seconds after input 1 is pressed
# signal
define signal input1_on $io.in1

# action
define action manual_capture trigger=input1_on create video --name={{$gnss.timestamp}}_input --time_win=-10,+15

In general if the options are available for your camera to add audio, you'll want to configure the following,

Recommended audio settings:

  • Audio encoding: G711
  • Sampling rate: 8kHz
  • Audio Stream Bitrate: 128kbps

# Fatigue Sensor Videos

Refer to the connect section of the Fatigue Sensor page for more information on capturing video clips with fatigue sensors.

Last Updated: 9/29/2021, 11:21:59 AM