79 lines
1.4 KiB
Markdown
79 lines
1.4 KiB
Markdown
# Vehicle Video Service
|
|
|
|
This repository builds and packages the vehicle video service as one deployable stack:
|
|
|
|
- `vehicle_video_service`: camera capture, RTMP push, MQTT status and record query handling.
|
|
- SRS live instance: low-latency live playback over RTMP to WebRTC/WHEP.
|
|
- SRS record instance: DVR segment recording and HTTP file serving.
|
|
- systemd units for all three services.
|
|
|
|
## Build
|
|
|
|
```bash
|
|
./scripts/build_video.sh
|
|
```
|
|
|
|
If you need to rebuild SRS from the bundled source:
|
|
|
|
```bash
|
|
./scripts/build_srs.sh
|
|
```
|
|
|
|
SRS is built out-of-tree into:
|
|
|
|
```text
|
|
build/srs/objs/srs
|
|
```
|
|
|
|
## Package
|
|
|
|
```bash
|
|
./scripts/package_release.sh
|
|
```
|
|
|
|
Or build everything and package it in one command:
|
|
|
|
```bash
|
|
./scripts/build_all.sh
|
|
```
|
|
|
|
The output is:
|
|
|
|
```text
|
|
dist/vehicle-video-service-aarch64.tar.gz
|
|
```
|
|
|
|
## Install On Target
|
|
|
|
```bash
|
|
tar -xzf vehicle-video-service-aarch64.tar.gz
|
|
cd vehicle-video-service-aarch64
|
|
sudo ./install.sh
|
|
```
|
|
|
|
Defaults:
|
|
|
|
- Install dir: `/opt/vehicle-video-service`
|
|
- Record dir: `/media/record`
|
|
- Runtime user: `$SUDO_USER`
|
|
|
|
You can override them:
|
|
|
|
```bash
|
|
sudo INSTALL_DIR=/opt/vehicle-video-service SERVICE_USER=aiec ./install.sh
|
|
```
|
|
|
|
## Services
|
|
|
|
```bash
|
|
systemctl status vehicle-video-srs-live.service
|
|
systemctl status vehicle-video-srs-record.service
|
|
systemctl status vehicle-video-service.service
|
|
```
|
|
|
|
The application reads `config.json` next to the executable at:
|
|
|
|
```text
|
|
/opt/vehicle-video-service/bin/config.json
|
|
```
|