Automatic soft padding running on the TiVo (new version)

Discussion in 'TiVo Series 1 - UK' started by maxwells_daemon, Feb 11, 2006.

  1. May 20, 2006 #81 of 394
    Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...

    Advertisements

    I guess I must have been lucky then, by not missing the start of a programme. Is it not the case though that compare to the likelyhood of missing the ends of programmes, missing the start is very low?

    I think what we've got so far is pretty good;

    Standalone recording - can be started early and can be finished late.
    Back to back recordings - first one can be started early and finished late. Second one can be finished late.

    So the only bit missing is starting the second one early. However, even if that functionality was possible (which as I mentioned before, I think there are problems with the current recording getting lost if it is terminated early) you are then going to run in to a whole load of complex decisions about which type of padding takes priority - endpad the current recording (and start the second one late) or startpad the second recording and finish the first one early - for me, I think endpadding should always take priority (as I'd rather miss the start of something than the end).

    I think endpad has got the methodolgy correct in that endpadding can always be added, and startpadding if there is no preceding recording (and if there is chocie between start and endpadding, endpadding gets applied) :)

    There are always going to be certain occasions when the scheduling conspires against us and endpad can't possibly be expected to work out exactly what should and shouldn't be padded - in those cases a little bit of jiggery pokery with the season pass start and end times and the odd manual recording should sort things out.

    Having said all that and at the end of the day, it's only TV :eek: :)
     
  2. May 20, 2006 #82 of 394
    ericd121

    ericd121 Crown Topper

    1,347
    0
    Dec 12, 2002
    Milton...
    Thank you , Tim. :up:

    I read the regular expression page until my brain started to bleed... :rolleyes:

    I take it that ^ and $ denote the start and the end of the textstring?

    Can I run some examples past you? In endpad.config, would these work?

    p {Later with Jools Holland} -e 9
    p "Later with Jools Holland" -e 9
     
  3. May 20, 2006 #83 of 394
    Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...
    They work for me ;)
     
  4. May 20, 2006 #84 of 394
    maxwells_daemon

    maxwells_daemon New Member

    84
    0
    Apr 9, 2005
    Oxford, UK
    The link I gave you is in the Tcl documentation, and very brief. There's lots of other information out there on regular expressions (including whole books and web sites), though Tcl's (and hence Endpad's) is just one flavour.

    Yes.

    Either should do. They'd also apply 9 minutes end-padding to The best of Later with Jools Holland, if such a thing existed (that's where you'd use ^, in the unlikely event that that were a problem).
     
  5. May 20, 2006 #85 of 394
    ericd121

    ericd121 Crown Topper

    1,347
    0
    Dec 12, 2002
    Milton...

    Advertisements

    Perfect explanation! :up: Thank you. :)

    By George, I think I get it. ;) :p
     
  6. May 21, 2006 #86 of 394
    schwinn

    schwinn Member

    312
    3
    Sep 18, 2004
    Perfect explanation, and I can now see the "sense" in negative padding. So, basically, it's there to allow endpadding to continue on one program, while negative-padding the following program. I assume that you can negative-pad "globally" rather than by specifying programs. Makes sense to me now, thank you.

    Edit: Another way to put it - it allows endpadding to continue, even if it pushes off the start time of the following program (negative padding). Of course, this means both programs must already be in the ToDo list... which my example does not have...

    Maxneg also, therfore, makes sense, as does forceneg.
    No arument there - what I have proposed is certainly not the intended purpose of endpad, really, as it's a separate issue. In fact, using endpad with this separate program would be possible, as neither should interfere with each other...

    Now the problem is that I do not know TCL, so I cannot write a program to accomplish my desired feat - ie to provide conflict resolution for slightly overlapped programs. Do any of the endpad creators/modifiers (Sanderton? :) ) have the desire to give this one a try? I would really appreciate it, and I imagine other S1 owners would love to have it too.
     
  7. May 21, 2006 #87 of 394
    Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...
    It can be set either globally, per channel, per programme, time specific, or any combination of these parameters.
     
  8. May 22, 2006 #88 of 394
    schwinn

    schwinn Member

    312
    3
    Sep 18, 2004
    Well, negative padding sounds good. But, it still doesn't address the issue with non-scheduled recordings and "overlap protection".

    So, I would love to see overlap protection happen for S1 owners... but it seems no one is interested. So, I will see if I can figure it out myself... in the meantime, any help for TCL information and making TivoWeb modules is appreciated.
     
  9. May 22, 2006 #89 of 394
    Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...
    Not quite sure what you mean by this, or what you are trying to achieve, i.e. what do you mean by a non-scheduled recording (surely all recordings are scheduled) and what do you mean by overlap protection?
     
  10. May 23, 2006 #90 of 394
    schwinn

    schwinn Member

    312
    3
    Sep 18, 2004
    As I mentioned above, I was hoping that negative padding would provide "overlap protection" as many S2 users have this feature built into their software. Unfortunately, endpad doesn't work that way... but a new TCL could be made to accomplish this task.

    "Overlap protection" is the term used for the S2 Tivos, and it allows for 2 slightly-overlapping programs (less than 5 minutes, I think) to both record - by negative padding the second one. For example, if Show1 goes from 9pm-10pm, but Show2 goes from 9:59pm-11pm, only one will record (our NBC network here does this often, and others are starting to do this on and off). Since one of these 2 programs are automatically cancelled (via season pass priority) endpad would not work to resolve this. So...

    As I mentioned above (direct cut and paste): Here's my line of thought: Sanderton has already created a TCL program that can identify conflicts and send them to a second networked Tivo. My thought is, if you identify the conflict, then see if it's only 1-5 minutes (or whatever) overlap, you can add the recording to the same tivo (instead of a second tivo) with the appropriate negative padding.

    All the pieces are there, just need to be combined to make it work this way. Like I said, if I knew TCL well enough, I am sure it's a trivial task to make this happen (even if it's manual via TivoWeb Module for now).
     
  11. May 23, 2006 #91 of 394
    tym

    tym New Member

    19
    0
    Sep 28, 2005
    Melbourne,...
    Having played a bit with endpad, I would suggest it is not a trivial task to do completely, although you may be able to handle a subset of the possible cases fairly easily using parts of the negpad code and the conflicts module.

    An example of the more hairy problems you might have to handle: Say you had SPs 1, 2 and 3 (prioritized as such). 1 overlapped slightly with 2, which overlapped with 3. Tivo would schedule 1 and 3, but you probably want 1, 2 cropped, and 3 cropped or descheduled (depending on the size of the overlap). Ug.

    Tim
     
  12. May 24, 2006 #92 of 394
    schwinn

    schwinn Member

    312
    3
    Sep 18, 2004
    Good point... what would happen if Tivo were scheduled (externally, in this case) to record #2... would #3 then be cancelled because of overlap? If this is the case, then the solution is simple, as you simply recurse through this once more, and find that 1 and 2 are recording (with 2 being start-cropped), and then schedule 3 (with this code) to be start-cropped and added again.

    Of course, if this automatic cancellation doesn't happen, then we could likely end up with a crash, I would imagine, as both programs would want to record in that overlap between 2 and 3... and who knows what that would do.

    In any case, the code could be made to simply check to ensure that #2 has availabiliy to record, otherwise it could simply error to the TivoWeb screen (since these are TW modules right now, anyway). Of course, to get fancier, the code could also help resolve this, too... but that's a few steps ahead of ourselves.

    So, I don't see a problem with this, other than ensuring it doesn't crash the Tivo.

    The more complex issue is such: Assume SP1 and SP2, where the show order is actually SP2 - SP1 (with 1 having priority). In that case, SP1 would be recorded, while SP2 would not... here the code would need to crop the start of the already scheduled SP2, and then add SP1. Not really that complicated, but it just brings forth the need for the code to realize the recording order, and then crop appropriately (as opposed to cropping the cancelled one only). I imagine start-cropping of existing recordings is certainly possible (as negative padding does this on the fly)...

    In the end, the code doesn't have to be perfectly intelligent... as long as it doesn't cause further issues...

    I really wish I knew TCL better... I other languages, but I don't program that often, so it's a slower learning curve for me.
     
  13. May 24, 2006 #93 of 394
    sanderton

    sanderton TiVoer since 11/2000

    6,341
    0
    Jan 4, 2002
    If 2 was manually scheduled, the both 1 and 3 would be cancelled. If 1 was already recording the partial recording would be lost.

    EndPad in effect works by tinkering with the To Do List on the fly. The problem really is that if the unamended recording is blocked as in the examples above it isn't in the To Do List in the first place, so EndPad can do nothing with it.

    That's not impossible to work around - you'd have to have Endpad look in the History, identify shows cancelled due to an overlap, ensure that they haven't been rescheduled at some other time, and resurrect them as a new, shortened recording.

    Not impossible, but not easy either.
     
  14. May 24, 2006 #94 of 394
    schwinn

    schwinn Member

    312
    3
    Sep 18, 2004
    I meant that when 2 was manuall scheduled in, it would be start-cropped to prevent interference with 1. Of course, then it would interfere with 3...

    I realize that endpad can't perform these tasks, nor do we want it to, since that's not the intended operation anyway (it's not an end-pad program, it's an "overlap protection" program.

    This is why I would start with confres0.2 instead, which deals specifically with conflicts, and instead of sending to another tivo, simply have it start-crop when necessary... it wouldn't need to run repeatedly, except maybe once a week... or via manual TivoWeb intervention, if necessary.
     
  15. Jun 2, 2006 #95 of 394
    ericd121

    ericd121 Crown Topper

    1,347
    0
    Dec 12, 2002
    Milton...
    Having installed this version, I am very impressed and pleased; thanks, guys. :up:

    However, I've been missing negative padding due to not remembering this:-
    I currently have this in my rc.sysinit.author
    /var/hack/endpad.tcl -s 1 -e 4 -auto >> /dev/null &

    I know I could change this to
    /var/hack/endpad.tcl -s 1 -e 4 -f 1 -auto >> /dev/null &
    but I want to check if I can move all my values into endpad.config, thus changing the above to
    /var/hack/endpad.tcl -auto >> /dev/null &
    and editing endpad.config to
    s 1 e 4 f 1
    p Jools n 19
    p Pops n 2
    p Click s 0 e 0
    c BBCR4FM s 0 e 2
    ?

    That should work, shouldn't it?

    (Yes, Fozzie, I will try it, but it's nice to be told the correct usage. ;) )

    Hhmmm... Reading the ReadMe, -s, -e and -f are arguments used to run endpad in rc.sysinit.author; however, -s and -e, but not -f, are keyword abbreviations that can be used in endpad.config. :confused:
     
  16. Jun 2, 2006 #96 of 394
    maxwells_daemon

    maxwells_daemon New Member

    84
    0
    Apr 9, 2005
    Oxford, UK
    I think it's just missing from the readme.txt (and comments in endpad.config). f 1 or forceneg 1 should work in endpad.config. :)

    Thanks for the comment. I'll fix the readme in any next version of endpad.

    Tim.
     
  17. Jun 2, 2006 #97 of 394
    ericd121

    ericd121 Crown Topper

    1,347
    0
    Dec 12, 2002
    Milton...
    I was wondering why 1 minute's start padding hadn't been added to Big Brother tonight, so I checked endpad.msg, which stated

    Friday 18:28:00 : Deleting suggestion {Poseidon European Premiere Special} on ITV2 to make room for 60 seconds startpad of {Big Brother} on C4
    Friday 18:28:00 : Added 240 seconds end padding to {Channel 4 News} on C4
    Friday 18:28:00 : Added 60 seconds start padding to {Big Brother} on C4
    .

    However, endpad.log states

    Friday 19:28:00 : Woken up
    Friday 19:28:00 : Recording {Poseidon European Premiere Special} on ITV2 (Suggestion) now
    Friday 19:28:00 : Recording Scheduled End Time: 19:30
    Friday 19:28:00 : Next recording is {Big Brother} on C4 at 19:30
    Friday 19:28:00 : Gap to next programme is 0 seconds
    Friday 19:28:00 : Can't add end padding to {Poseidon European Premiere Special}
    Friday 19:28:00 : Next end padding setting due 20:25
    Friday 19:28:00 : Gap to previous recording is 0 seconds
    Friday 19:28:00 : Can't add start padding to {Big Brother}

    which seems closer to the truth.

    More to the point, Poseidon European Premiere Special wasn't deleted, and is in Now Showing.

    None of this is a problem; I just thought the programmers might find this intriqueing.
     
  18. Jul 17, 2006 #98 of 394
    ericd121

    ericd121 Crown Topper

    1,347
    0
    Dec 12, 2002
    Milton...
    Endpad stopped on Tivo 2 last night, and here is the error.log
    Code:
    Sleeping, checking every minute for kill signal.............................
    Sunday 18:23:00 : Woken up
    Sunday 18:23:00 : No recording in progress
    Sunday 18:23:00 : Next recording is {Top of the Pops} on BBC2 at 18:25
    Sunday 18:23:00 : No end padding required:
    Sunday 18:23:00 : No recording in progress
    Sunday 18:23:00 : Next end padding setting due 18:55
    Sunday 18:23:00 : Added 60 seconds start padding to {Top of the Pops} on BBC2
    Sunday 18:23:00 : Next start padding setting due 18:55
    Sunday 18:23:00 : Next wake up will be 18:53
    Sleeping, checking every minute for kill signal...............................
    Sunday 18:53:00 : Woken up
    Sunday 18:53:00 : Recording {Top of the Pops} on BBC2 now
    Sunday 18:53:00 : Recording Scheduled End Time: 19:00
    Sunday 18:53:00 : Next recording is {Poker Face} on ITV1ANG at 19:00
    Sunday 18:53:00 : Current recording ({Top of the Pops} at 18:25 on Sun) matches 'Pops' so use negpad 2
    Sunday 18:53:00 : Not time to add end padding yet
    Sunday 18:53:00 : Next end padding setting due 18:55
    Sunday 18:53:00 : Not time to add start padding yet
    Sunday 18:53:00 : Next start padding setting due 18:58
    Sunday 18:53:00 : Next wake up will be 18:55
    Sleeping, checking every minute for kill signal...
    Sunday 18:55:00 : Woken up
    Sunday 18:55:00 : Recording {Top of the Pops} on BBC2 now
    Sunday 18:55:00 : Recording Scheduled End Time: 19:00
    Sunday 18:55:00 : Next recording is {Poker Face} on ITV1ANG at 19:00
    Sunday 18:55:00 : Current recording ({Top of the Pops} at 18:25 on Sun) matches 'Pops' so use negpad 2
    Sunday 18:55:00 : Gap to next programme is 0 seconds
    Sunday 18:55:00 : Need to add 120 seconds of negative padding to {Poker Face}
    Sunday 18:55:01 : Original start time for {Poker Face} is 68400
    Sunday 18:55:01 : New start time is 68520
    Sunday 18:55:01 : Error detected
    Sunday 18:55:01 : no such object: dbobj10736 dbobj10737 dbobj10738
    while executing
    "dbobj $programsource fsid"
    ("uplevel" body line 18)
    invoked from within
    "uplevel $body"
    invoked from within
    "transaction {uplevel $body}"
    (procedure "RetryTransaction" line 4)
    invoked from within
    "RetryTransaction {
    set rec [db $db openid $recfsid]
    
    set programsourcefsid 0
    set showing [dbobj $rec get Showing]
    set station [dbobj $..."
    (procedure "AddNegativeStartPadding" line 65)
    invoked from within
    "AddNegativeStartPadding $nextrecfsid $negativepaddingtoadd"
    Sunday 18:55:01 : Attempting to recover
    Sunday 18:55:31 : Woken up
    Sunday 18:55:31 : Recording {Top of the Pops} on BBC2 now
    Sunday 18:55:31 : Recording Scheduled End Time: 19:00
    Sunday 18:55:31 : Next recording is {Poker Face} on ITV1ANG at 19:00
    Sunday 18:55:31 : Current recording ({Top of the Pops} at 18:25 on Sun) matches 'Pops' so use negpad 2
    Sunday 18:55:31 : Gap to next programme is 0 seconds
    Sunday 18:55:31 : Need to add 120 seconds of negative padding to {Poker Face}
    Sunday 18:55:31 : Original start time for {Poker Face} is 68400
    Sunday 18:55:31 : New start time is 68520
    Sunday 18:55:31 : Error detected
    Sunday 18:55:31 : no such object: dbobj10754 dbobj10755 dbobj10756
    while executing
    "dbobj $programsource fsid"
    ("uplevel" body line 18)
    invoked from within
    "uplevel $body"
    invoked from within
    "transaction {uplevel $body}"
    (procedure "RetryTransaction" line 4)
    invoked from within
    "RetryTransaction {
    set rec [db $db openid $recfsid]
    
    set programsourcefsid 0
    set showing [dbobj $rec get Showing]
    set station [dbobj $..."
    (procedure "AddNegativeStartPadding" line 65)
    invoked from within
    "AddNegativeStartPadding $nextrecfsid $negativepaddingtoadd"
    Sunday 18:55:31 : Attempting to recover
    Sunday 18:55:31 : Too many errors, stopping
    I seem to remember I did have two or three Season Passes for Top of the Pops, which I cleared down to one on Saturday.

    I wonder if this may be the cause?
     
  19. Jul 30, 2006 #99 of 394
    khadland

    khadland New Member

    27
    0
    Aug 29, 2002
    Help!

    I'm at the folk's house for a Barbie - installed Endpad for them ages ago but it seems that the /var/hack directory got wiped a few weeks ago, so brought my serial cable with me and have tried re-installing the latest version. I've chmodded everything to 755, the rc.sysinit.author is

    /var/hack/endpad.tcl -s 1 -e 5 -auto >> /dev/null &

    but when i've tried manual recordings they are starting & stopping on time with no padding going on so my 'technical wizz kid' badge is starting to look a bit shabby...

    Installing endpad is about as brave as i've ever got with a Tivo - is there an idiot-proof way to check that it's being started up correctly by using the serial cable. Other than endpad this is a bog standard tivo, the only other hack was to get the bash prompt up so no fancy tools or anything else... any help most welcome!

    TIA

    Keith
     
  20. maxwells_daemon

    maxwells_daemon New Member

    84
    0
    Apr 9, 2005
    Oxford, UK
    You can look what it's doing by checking out the /var/log/endpad.msg file (just "cat /var/log/endpad.msg") from the bash prompt. If that doesn't give enough details you can see more of what it is thinking by looking at endpad.log in the same directory.

    If those files aren't there, or the log file has an error message, then endpad isn't running (if you had the "ps" program, then you could check directly, but that isn't on standard TiVo).

    By the way, did you try starting it by hand as well as via rc.sysinit.author (which only runs when the TiVo is rebooted)? That might show an error message if there is a problem.

    Tim.
     

Share This Page

spam firewall

Advertisements