Project

General

Profile

Tvheadend recording management » History » Version 7

Adam Sutton, 2012-08-23 10:40

1 1 Hein Rigolo
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
2 2 Hein Rigolo
3 1 Hein Rigolo
4 6 renne -
h2. Initial thoughts
5
6
7 1 Hein Rigolo
Here are some initial thoughts that we might need to find answer to;
8 2 Hein Rigolo
9 6 renne -
* should you be able to delete a recording from the OS and how should the DVR handle that
10 1 Hein Rigolo
11 5 renne -
 ||Yes (e.g. for postprocessing-scripts), check recording directory regularly or callback via kernel notify.||
12 3 Hein Rigolo
13 6 renne -
* how do we keep tvheadend from filling up your hdd
14 5 renne -
15
 ||Global quota and per user quota||
16 1 Hein Rigolo
17 6 renne -
* should you need to specify a certain "savety" disc space
18 5 renne -
19 1 Hein Rigolo
 ||Achieved with global quota||
20 5 renne -
21 6 renne -
* what if an other process is filling up the hdd .. should that mean we keep deleting recordings ?
22 1 Hein Rigolo
23 5 renne -
 ||If another process causes havoc it's the admins problem, not TVHeadEnd's. Send an alert to the admin (e.g. Email)||
24 3 Hein Rigolo
25 6 renne -
* when do we "expire"/delete recordings? when a new recordign starts make enough room to completly record it?
26 5 renne -
27
 ||Priority and lifetime settings per recording with configurable default||
28
29 6 renne -
* what is there are 3 or 4 concurent recordings? how do we know we have enought space
30 1 Hein Rigolo
31
 ||We can't. Estimate needed diskspace and act if estimation fails||
32
33 6 renne -
* 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)
34 5 renne -
35 1 Hein Rigolo
 ||Just check at the beginning of a recording||
36 5 renne -
 ||take the duration of a recording/size of recording and use that as a measure (average over time??)||
37
 ||estimaed recording lenght * estimated bit-rate to determine how much we need to clear||
38 1 Hein Rigolo
39 6 renne -
* do we need to keep track of the amount of free-space during a recording and possible delete more old recordings when needed
40 5 renne -
41 6 renne -
 ||Yes, estimation can fail, especially with Variable [[BitRate]]||
42 5 renne -
43 6 renne -
* 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
44 1 Hein Rigolo
45 5 renne -
 ||No, you don't know about other processes, so it makes no sense||
46 1 Hein Rigolo
47 6 renne -
* 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
48 5 renne -
49
 || Yes, it's admins task to plan hardware. But in case of problems recordings with lower priority shall be dropped.
50 1 Hein Rigolo
51 6 renne -
* do we want to support multiple storage locations?
52 5 renne -
53 1 Hein Rigolo
 ||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||
54 5 renne -
55 6 renne -
* do we want to have support linking multiple instances of tvheadend to schedule recordings across multiple backends?
56 1 Hein Rigolo
57 5 renne -
 || It makes sense if you run out of PCI(e)-slots and USB-ports or want failover, but not for small setups||
58 3 Hein Rigolo
59 6 renne -
*  how about conflict handling? I have 2 capture cards but I want to record from 3 transportstreams how to manage that ?
60 5 renne -
61
 ||multiplex-recording and priorities per recording/user if there is a conflict||
62 1 Hein Rigolo
63 6 renne -
* we also need to "re-arrange" all previous scheduled recordings if a new request comes in
64 1 Hein Rigolo
65
 ||No, in case of conflict alert affected users. If users do not react, alert admin||
66
67 6 renne -
*  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?
68 1 Hein Rigolo
69 5 renne -
 ||NO!!! For multiplex recording tuners have to be assigned dynamically. Calculate how many bouquets are to record and how many tuners we have||
70
71 6 renne -
* 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?
72 1 Hein Rigolo
73 5 renne -
 ||No, check the number of bouquets and the number of tuners. If there are not tuners left, deny the request (first come, first serve).
74
75 6 renne -
* who solves the conflict? can everybody make that decision? should that be a "user rights" option?
76 1 Hein Rigolo
77 5 renne -
 ||In case of conflict the later request is denied and the user can ask another user to drop a schedule for him||
78
79 6 renne -
* how do we inform the original requested user if his or her recording has been removed in order solve a conflict?
80 4 Hein Rigolo
81
 ||Use popups for alerts. If the user is not logged in, use email||
82
83
84 6 renne -
h2. basic guidelines
85
86
87 4 Hein Rigolo
in order to keep things focused we need to have a set number of basic guidelines for this:
88
89 6 renne -
* Tvheadend will only use one location for storing recordings. 
90
* 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.
91
* 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.
92
* Tvheadend will determine free disc space only on the recording location filesystem.
93
* Tvheadend will determine expected recording size based on previous recordings (of that service, or total average when no recordings are known)
94 1 Hein Rigolo
95 6 renne -
* Tvheadend will not use a database to store information about recordings.
96
* Tvheadend recordings should contain enough metadata to show meaningfull information via the webGUI.
97
* Tvheadend can be used to manually delete recordings via the webGUI
98
* Tvheadend will remove recordings from the webGUI when delete from the commandline/other tools
99
* Tvheadend will remove recording when moved away from the recoring location.