Project

General

Profile

Actions

Tvheadend recording management » History » Revision 5

« Previous | Revision 5/7 (diff) | Next »
renne -, 2010-12-22 15:16


Tvheadend has a DVR/PVR function. At the moment the recording management is extreemly basis. This page will describe possible options for improving this and the design decisions that need to made to implement these improvements

Initial thoughts

Here are some initial thoughts that we might need to find answer to;

  • should you be able to delete a recording from the OS and how should the DVR handle that
Yes (e.g. for postprocessing-scripts), check recording directory regularly or callback via kernel notify.
  • how do we keep tvheadend from filling up your hdd
Global quota and per user quota
  • should you need to specify a certain "savety" disc space
Achieved with global quota
  • what if an other process is filling up the hdd .. should that mean we keep deleting recordings ?
If another process causes havoc it's the admins problem, not TVHeadEnd's. Send an alert to the admin (e.g. Email)
  • when do we "expire"/delete recordings? when a new recordign starts make enough room to completly record it?
Priority and lifetime settings per recording with configurable default
  • what is there are 3 or 4 concurent recordings? how do we know we have enought space
We can't. Estimate needed diskspace and act if estimation fails
  • do we keep track of the estimated bit-rates of the various channels to beter figure out the needed space for a recording? (difference between SH and HD etc)
Just check at the beginning of a recording
take the duration of a recording/size of recording and use that as a measure (average over time??)
estimaed recording lenght * estimated bit-rate to determine how much we need to clear
  • do we need to keep track of the amount of free-space during a recording and possible delete more old recordings when needed
Yes, estimation can fail, especially with Variable BitRate
  • do we need to test the write speed of the filesystem that is used to store recordings? in order to prevent too many concurrent recordings
No, you don't know about other processes, so it makes no sense
  • or do we say: if you have a need to record a large number of concurent recordings .. make sure your filesystem is up to it
|| Yes, it's admins task to plan hardware. But in case of problems recordings with lower priority shall be dropped.
  • do we want to support multiple storage locations?
No, we cannot anticipate any possible setup. "mount --bind" and symlinks are our friends. But use sub-directories per user and allow per recording sub-directories
  • do we want to have support linking multiple instances of tvheadend to schedule recordings across multiple backends?
It makes sense if you run out of PCI-slots and USB-ports or want failover, but not for small setups
  • how about conflict handling? I have 2 capture cards but I want to record from 3 transportstreams how to manage that ?
multiplex-recording and priorities per recording/user if there is a conflict
  • we also need to "re-arrange" all previous scheduled recordings if a new request comes in
No, in case of conflict alert affected users. If users do not react, alert admin
  • do we directly link a recording schedule already to a capture card? so that we can keep track and use that when working out possible conflicts?
NO!!! For multiplex recording tuners have to be assigned dynamically. Calculate how many bouquets are to record and how many tuners we have
  • what if there are multiple clients making a schedule recording request. Do we keep one "on hold" untill the first one is completed and scheduled?
||No, check the number of bouquets and the number of tuners. If there are not tuners left, deny the request (first come, first serve).
  • who solves the conflict? can everybody make that decision? should that be a "user rights" option?
In case of conflict the later request is denied and the user can ask another user to drop a schedule for him
  • how do we inform the original requested user if his or her recording has been removed in order solve a conflict?
Use popups for alerts. If the user is not logged in, use email
basic guidelines

in order to keep things focused we need to have a set number of basic guidelines for this:

  • Tvheadend will only use one location for storing recordings. * Tvheadend will make as many concurent recordings as requested. If the filesystem can not keep up, you need to fix that on the linux side. * Tvheadend will clear enough room to store the expected recording size at the start of the recording. It will take into account already running recordings. * Tvheadend will determine free disc space only on the recording location filesystem. * Tvheadend will determine expected recording size based on previous recordings (of that service, or total average when no recordings are known)
  • Tvheadend will not use a database to store information about recordings. * Tvheadend recordings should contain enough metadata to show meaningfull information via the webGUI. * Tvheadend can be used to manually delete recordings via the webGUI * Tvheadend will remove recordings from the webGUI when delete from the commandline/other tools * Tvheadend will remove recording when moved away from the recoring location.

Updated by renne - about 14 years ago · 5 revisions