PIDVR-2 - Initial High Level Design ============================== Aim ---- To create a Raspberry Pi based DVR system. The eventual solution should, ideally be meshable so that multiple Pi's can operate as a cluster Ingest Formats ---------------- The system will be capable of ingesting video using a range of methods - Live capture (Freesat) - Stream based push to named pipe - Pull from URL (supported formats tbc) - Push publishing (possibly via WebDAV) - Proprietary feed capture (the first being BBC IPlayer) Scheduling API ---------------- A generic JSON based API will be created to allow for easy/automated scheduling of recordings. The scheduling system will need to be aware of the resources available to it (for example, if recording from FreeSat, will the tuner already be in use? If so, is the requested channel on the same MUX as the other scheduled recording?) Video Egress -------------- Assuming the Pi's limited resources can handle the load, all video should be transcoded to a fixed format prior to being marked available for egress. Whether transcoding to a single format is viable or not, all video formats used should be capable of being streamed via HTTP (HLS is probably a good candidate). Asset Availability -------------------- As asset availability will be dependant on the status of recording/transcoding, a simple script should be created to generate a listing of available files - those that are still recording (or being transcoded) should not be listed as available Asset Management ----------------- A small API should be exposed, allowing management of available assets. In particular it should support the following - Check status of an asset (is it recording?) - Override status of an asset - Delete an asset - Obtain stored asset metadata (Series name, episode no etc) - Obtain direct download URL for asset The latter 2 will allow a downstream storage appliance to automatically retrieve a recording and then purge it from the DVR. Asset Filenames ----------------- There should be two modes of filename available - Internal ID (likely sha1 based or similar) - $series_name.S$series_noE$episode_no-$episode_title.$filename_extension The latter will allow XBMC (and similar) based systems to add recordings to their libraries. The filename format used should be set by a config option (with the potential possibility of being overridden when the recording is first scheduled) BBC IPlayer Support --------------------- IPlayer capture support can be implemented via the get_iplayer package, and so the API's would simply need to be written to allow interaction and scheduling. FreeSat Support ------------------ The scheduler will need to have some idea of which channels are available on which MUX's, as well as how many tuners are available. Long-term, some kind of EPG support would also be useful, but in the short-term programme start/end times can be left to client making the scheduling request. Database --------- As the initial implementation will likely focus on a standalone Pi, the initial implementation can use a SQLite3 database. However, as replication support is planned for later versions, database calls should be abstracted out so that they can easily be replaced with MySQL queries at a later date. Commodity Hardware ------------------- The aim of the project is to use a Pi (or several) to create a scalable DVR. However, the end result should not be Pi specific. It should be possible (and ideally simple) to configure on more capable hardware.