Crates.io | simple-network-video-recorder |
lib.rs | simple-network-video-recorder |
version | 0.1.2 |
source | src |
created_at | 2024-04-01 22:11:18.225012 |
updated_at | 2024-04-10 12:16:27.771578 |
description | A simple (NVR) to capture video stream into mp4 files without filling up the disk entirely! |
homepage | |
repository | https://github.com/dancavolix/simple-network-video-recorder |
max_upload_size | |
id | 1192993 |
size | 26,483 |
A simple network video recorder (NVR) for you to capture your video stream into mp4 files without filling up your disk entirely!
It does two things:
Please take a momment to read the LICENSE
terms before going any further.
Warning! For now, you have to build your own binaries, since you need to setup a few environment variables first. I plan to fix this in the future by introducing a CLI.
Installation steps:
You must have rust
and ffmpeg
already installed on your system. Please refer to rust-lang.org and ffmpeg.org on how to achieve this requirement;
Clone this repository with git clone https://github.com/dancavolix/simple-network-video-recorder.git
Change to the project root directory cd simple-network-video-recorder
;
Use cargo build --release
to build the project locally.
Inside the root directory, copy the configuration file by running cp .env.example .env
. Before running the app, you first need to set the values in the file .env
. Here is short description of what is each one of those:
URI
: the stream URI which is something like rtsp://username:password@192.168.x.y/cam/example
;SOURCE_ID
: a name to better identify your files (in case of multiple streams). Avoid using spaces and special characters;SAVE_DIR
: the directory where segments will be stored into files, .e.g., SAVE_DIR=/home/user/my-videos
;SEGMENT_DURATION
: the segment duration in seconds, e.g, set to 3600
for an hour long segments;STORAGE_CAPACITY
: how much disk space should the segments occupy in total, e.g., set 128000000000
(nine zeroes) for 128GB.Warning! The value on SEGMENT_DURATION
and STORAGE_CAPACITY
are very important to be set right. You have to do your own experiments and find out what best suits your need, but notice the default settings (hour long segments and 128GB storage size will do just fine, considering you have this much free space in your disk).
Simply run cargo run --release
.