Recording Mechanism
RUSEON Core records video streams to disk using the fMP4 (fragmented MP4) format via bluenviron/mediacommon.
Core Logic
- KeyFrame Trigger: Recording and file creation only start on a KeyFrame.
- GOP Alignment: Fragments inside the fMP4 file are GOP-aligned (Group of Pictures).
- Rotation: Files are rotated every 1 hour, triggered exactly on a KeyFrame boundary to ensure each file starts with an I-frame.
Linux I/O Optimizations
To handle high throughput across dozens of cameras, the recorder utilizes specific Linux I/O syscalls:
sync_file_range: Performs asynchronous flushes to disk in 2MB chunks.FADV_DONTNEED: Instructs the OS to drop the page cache for written chunks, preventing the system RAM from being saturated by video files.
Performance
By bypassing standard page cache accumulation, RUSEON Core ensures stable memory usage even when recording terabytes of data.