Project

General

Profile

Tvheadend recording management » History » Version 5

renne -, 2010-12-22 15:16

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