OneNVR v2.0 Release Notes
Major Architecture Changes
This release introduces significant simplifications to the codebase for improved reliability and 24x7 operation stability.
Breaking Changes
- Eliminated the intermediate
/raw
directory - Videos now write directly to date-specific directories:
/storage/{camera}/{YYYY-MM-DD}/
- Migration Required: Existing
/raw
directories should be manually cleaned up after upgrade
- No more periodic moving of completed segments between directories
- ffmpeg writes directly to final destination directories
- Reduces I/O overhead and eliminates race conditions
New Features
Proactive Directory Management
- System creates date directories before they're needed
- Automatic next-day directory creation at 22:00 hours
- Prevents ffmpeg failures during midnight transitions
Optimized Performance
- Directory monitoring reduced to hourly checks
- Concatenation uses
ionice
for reduced I/O impact during recording - Simplified restart logic with configurable cooldown periods
Improved Reliability
Better Process Management
- Streamlined health checks with boolean status
- Single
restart()
method replacing complex state tracking - Automatic recovery from network disruptions
Reduced Complexity
- Removed redundant scheduled tasks
- Consolidated multiple health check methods
- Cleaner separation of concerns between components
Compatibility Notes
- Configuration file format remains unchanged
- Web interface unchanged - all existing URLs work
- Docker volume mounts remain the same
- Existing video files are compatible
Upgrade Instructions
- Stop the current OneNVR instance
- Update to v2.0
- Start the new version
- Manually move any video files from old
/storage/{camera}/raw
directory to date-specific directory if they exist - Manually remove old
/storage/{camera}/raw
directories if they exist - Monitor logs for successful directory creation and recording startup
Performance Improvements
- 60x reduction in directory check frequency (1440 → 24 daily checks)
- Eliminated file I/O operations for segment moving
- Low-priority I/O scheduling for concatenation operations
- Reduced CPU overhead from simplified health monitoring
Note: This release focuses on long-term stability and reduced resource usage for continuous 24x7 operation. The changes may require a brief setup period as the system creates new directory structures.