Introduction
Introduction to
ew-npvrOverview
The service ew-npvr is a Network Personal Video Recorder (NPVR) solution that enables
the management of recorded content. It provides a complete system for handling
personal video recordings with reduced storage usage by reusing duplicated segments.
ew-npvr is designed to integrate with AgileTV Origin’s live ingest channels and provides
capabilities for recording and storing content. The repackager reads the recorded content
directly from the NPVR storage location.
Key Features
- Content Management: RESTful API for managing NPVR recordings with CRUD operations
- Channel Integration: Integrates with live ingest channels (ESB3003) for recording management
- Thumbnail Generation: Automatic thumbnail generation for recorded content using OpenCV
- Flexible Storage: Configurable storage locations with support for copy or hard-link behavior
- Optional Database: PostgreSQL-backed metadata storage
- Cursor-based Pagination: Efficient pagination for listing large numbers of recordings
- Swagger Documentation: Interactive API documentation available at
/swagger/ - Rate Limiting: Configurable write rate limiting for file copy operations
- Graceful Degradation: The service keeps running if the database is unavailable (the management API is simply not started)
Architecture
ew-npvr consists of several key components:
- Management API: RESTful administrative interface for managing recordings (default port: 8099)
- CRUD operations for NPVR entries
- Health check endpoint
- Swagger UI for API documentation
- Job Controller: Manages recording jobs and channel synchronization
- Database Layer: Optional PostgreSQL storage for recording metadata and state
- Channel Manager: Handles communication with live ingest channels via Unix socket
Recording States
NPVR entries progress through various states:
- pending: Recording request created, waiting to start
- ongoing: Recording is actively in progress
- done: Recording completed successfully
- error: Recording encountered an error
- deleting: Entry is being deleted
- updating: Entry metadata is being updated
- update-ongoing: Update is in progress
Use Cases
- Recording live channels for time-shifted viewing
- Personal video library management
- Catch-up TV services
- Content archival and replay
- Cloud DVR services