Results 1 to 6 of 6

Thread: Batch file to be executed when recording consecutive shows on the same channel

  1. #1
    Join Date
    Apr 2006
    Location
    United States - Massachusetts
    Posts
    373

    Batch file to be executed when recording consecutive shows on the same channel

    Let me explain my problem & maybe someone can come up with a better solution. When I am recording Fox owned cable channels or a free preview of HBO or Cinemax, I have to use the HDPVR attached to a STB. I have my blaster software setup to send a "Menu" and "Exit" before the channels since that will turn on the STB if it is off, but will not turn it off if it is already on. I have the STB setup to turn off after four hours without a button press. That way, I can record a show and the STB won't stay on all day and night. I could change to a shorter time out, a longer time or to just stay on all the time. My problem is that if I record say an American football game that is scheduled for three hours, I will schedule the show or two after in case the game goes into overtime. NPVR is smart enough to know that the other shows are on the same channel & doesn't execute the blaster. The STB turns off four hours after the first show started. If the game runs really long or I am recording two different things back to back, like two movies on a HBO preview weekend or two different sporting events, the STB might turn off before I want.

    Possible solutions:

    - I set the STB to stay on longer or not shut off at all:
    Plus: don't have to change anything else. Minus: if I am recording just an hour or thirty minutes, it stays on a long time afterwards.

    - I add something to PostProcessing.bat to turn off the STB:
    Plus: STB is turned off as soon as it isn't needed. Minus: need to make sure it isn't recording anything else.

    - sub calls a new batch file when recording consecutive shows on the same channel of a device that uses a blaster
    Plus: I just need to create a batch file that blasts "Menu" and "Exit". Minus: sub would need to do work that probably benefits nobody besides me. Also, would need to decide when it gets called if there is padding at beginning and end of shows.

    Now that I written these out and thought about it, I should probably just do the second one, but maybe somebody else can comment.
    Tuners: Ceton InfiniTV quad cable card tuner (PCIe). Hauppauge 2250 (PCIe). SD HDHR Dual Tuner. Use only QAM on HDHR and 2250. HDPVR - for Fox owned channels.
    Viewing: Usually an NMT connected via MoCA. Sometimes directly on the server below. Sometimes when I travel I use an NMT served from my laptop with a portable hard-drive.
    EPG: XML from SchedulesDirect via MC2XML
    Provider: Verizon Fios
    Server: Dell XPS 8700 with Windows 8.1

  2. #2
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,516
    I had similar oddities and decided to set the STB to stay on all the time. power consumption was only a tiny fraction more than in standby.
    With your situation, could you leave things as they are but use postprocessing to to send something harmless like exit to the STB just as something to reset its standby counter?


  3. #3
    Join Date
    Jun 2007
    Location
    St. Paul, MN, USA
    Posts
    1,055
    Quote Originally Posted by ElihuRozen View Post
    - sub calls a new batch file when recording consecutive shows on the same channel of a device that uses a blaster
    Plus: I just need to create a batch file that blasts "Menu" and "Exit". Minus: sub would need to do work that probably benefits nobody besides me. Also, would need to decide when it gets called if there is padding at beginning and end of shows.
    Another minus to this option would be that you would get a menu display in your recording, correct?

  4. #4
    Join Date
    Jun 2007
    Location
    St. Paul, MN, USA
    Posts
    1,055
    Quote Originally Posted by ElihuRozen View Post
    - I add something to PostProcessing.bat to turn off the STB:
    Plus: STB is turned off as soon as it isn't needed. Minus: need to make sure it isn't recording anything else.
    Checking recording status is easy enough using Nscripthelper.

    Quote Originally Posted by martint123 View Post
    I had similar oddities and decided to set the STB to stay on all the time. power consumption was only a tiny fraction more than in standby.
    I would agree with Martin123, the power usage of the STB is probably minimal.

  5. #5
    Join Date
    Mar 2006
    Location
    Houston, Texas, USA
    Posts
    751
    Place your hand on top of the STB after it has been "off" for a few hours. Most likely, it's just as warm as when it was on. About the only thing that actually gets turned off on most STB's is the display. The rest of it stays on 24/7, always ready to instantly spring into action. Turning it off only saves a watt or two. Certainly not enough to worry much about.
    E4600 Core2Duo, 4GB RAM, Win7 Pro, HD5570, HDHomeRun Prime, NPVR 3.6.6, 2 Popcorn Hour A-100's and a partridge in a pear tree...
    On a clear disk, you can seek forever...

  6. #6
    Join Date
    Apr 2006
    Location
    United States - Massachusetts
    Posts
    373
    I ended up adding the following to my PostProcessing.bat
    Code:
    if not "%4." == "%HDPVRDEVICE%." goto doneExtraBlast
    "sqlite3.exe" -separator " -- " "..\npvr.db3" "SELECT CHANNEL_MAPPING.channel_source_number from SCHEDULED_RECORDING LEFT JOIN CHANNEL_MAPPING ON SCHEDULED_RECORDING.channel_oid=CHANNEL_MAPPING.channel_oid where (status = '1' and SCHEDULED_RECORDING.capture_source_oid = '%HDPVRDEVICE%')" >%3.txt
    set /p channel= <%3.txt
    if "%channel%." == "%2." "C:\Program Files (x86)\IR Server Suite\IRBlast-NoWindow.exe" "exit.IR"
    del %3.txt
    
    :doneExtraBlast
    This assumes HDPVRDEVICE has been set to the device number for the HDPVR. Most of my recordings are not on the HDPVR, so I don't want to do this for every recording.
    Tuners: Ceton InfiniTV quad cable card tuner (PCIe). Hauppauge 2250 (PCIe). SD HDHR Dual Tuner. Use only QAM on HDHR and 2250. HDPVR - for Fox owned channels.
    Viewing: Usually an NMT connected via MoCA. Sometimes directly on the server below. Sometimes when I travel I use an NMT served from my laptop with a portable hard-drive.
    EPG: XML from SchedulesDirect via MC2XML
    Provider: Verizon Fios
    Server: Dell XPS 8700 with Windows 8.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •