NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 379 380 381 382 383 … 433 Next »
NPVR - Getting started, current patches, tips and tricks **!!!!PLEASE READ!!!!**

Thread Closed 
NPVR - Getting started, current patches, tips and tricks **!!!!PLEASE READ!!!!**
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#51
2010-08-28, 04:29 PM
McBainUK Wrote:For the NShared.dll patch I found I had to exit the tray app awsell.
True, but if you use the "Stop NPVR Service" icon sub so thoughtfully provided it closes the tray app too. I'll tweak the instructions a little.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#52
2010-09-06, 09:56 AM (This post was last modified: 2011-01-15, 07:34 AM by johnsonx42.)
In case anyone finds it interesting, instructive, or amusing, here is my PostProcessing.bat for the purpose of running comskip. It runs no more than 2 comskips at once, and does a bit of logging into "processing.log".
Code:
@echo off

cd c:\comskip

echo %date%,%time% - PostProcessing.bat invoked on %1 recorded from channel %2 >>processing.log

Rem list of channels to not run comskip on; PBS channels have no commercials
if "%2" == "27" goto skip
if "%2" == "28" goto skip
if "%2" == "29" goto skip
if "%2" == "50" goto skip
if "%2" == "51" goto skip
if "%2" == "52" goto skip
if "%2" == "58" goto skip
if "%2" == "59" goto skip
if "%2" == "60" goto skip
if "%2" == "61" goto skip
goto next

:skip
echo skipping comskip on %1; channel %2 in skip list >>processing.log
goto continue

:next
rem need to add a pause to avoid race conditions
echo   ---  sleeping %2 seconds to avoid simultaneous execution >>processing.log
sleep %2

rem check how many comskips are running; if 2 or more are running wait 1 minute and check again
rem the third parameter passed in npvr 1.5.36 and later is a unique recording oid number, so it makes a good filename to store the temporary count
:check
tasklist | find /c "comskip" > %3.txt
set /p count= <%3.txt
if %count% geq 2 (
  echo ...%count% comskips running now, waiting 1 minute >>processing.log
  sleep 60
  goto check
)
del %3.txt

rem continuing now

Rem this trick also makes it possible to have dedicated comskip.ini file for certain channels.
rem if "%2" == "79" goto channel79
Rem use the default comskip.ini for all other channels
rem goto generic

rem :channel79
rem comskip --ini=channel79.ini %1
rem goto continue

:generic
echo %date%,%time% - invoking comskip on %1 >>processing.log
comskip %1
echo %date%,%time% - comskip finished with %1 >>processing.log

:continue

:eof

Some bits of it are left-overs from the sample gb-pvr postprocessing.bat included with comskip. I left them there in case I ever want to use them.

The bit where it sleeps for <channel number> (%2) seconds might introduce excessive waits for those with high 3-digit channel numbers; you'd probably have to implement it some other way. With the 1.5.36 update I've now switched to storing the temporary count in "%3.txt" where %3 is the recording ID number. This makes for a uniquely named file to store the temporary comskip count. I thought at first this would eliminate the need for the "sleep %2", since multiple postprocessing.bat files would each store their count in a unique file, but within just a couple of hours testing I saw a different race condition that resulted in too many comskips running at once so I restored the sleep. The use of the "%3" parameter still eliminates another race condition that sometimes resulted in no comskip running at all.

Additional non-comskip related commands would go after :continue.

This same file could be a ParallelProcessing.bat as well. In fact I wrote it initially for that use; the code to limit the number of comskips became necessary because I could easily get 4 comskips running at once - 2 finishing recordings that had just ended, and 2 for new recordings just begun. It was too much for my system. For other reasons though I opted not to run comskip in parallel, so I switched to PostProcessing. In PostProcessing I've yet to see more than 2 comskips actually try to run, but it could happen - consider two 2-hour movies followed by two 30-minute shows: comskip will probably still be running on both movies when the two half-hour shows finish and try to launch comskip.

The same basic code could be used for transcodes too; likewise you may not want too many transcodes running at once. tasklist | find /c "ffmpeg" > %3.txt seems reasonable, yes?

I almost forgot to mention, you will need the "sleep.exe" program from the Windows 2003 Resource Kit here: http://www.microsoft.com/downloads/detai...laylang=en. I thought of just attaching the sleep command to this message, but we don't want MS's goons coming after sub Wink. Also, HarryH3 has pointed out that the "tasklist" command is not included with all versions of windows; see his post below to get it (Thanks Harry!): http://forums.gbpvr.com//showthread.php?...post388992
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
skreien
Offline

Member

Posts: 161
Threads: 41
Joined: Jan 2005
#53
2010-09-14, 01:34 AM
Has the HDHR patch from HDHR Live Tv & Recording not made it into the cumulative patch? I can't seem to record more than one at a time right now.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#54
2010-09-14, 08:08 AM
I'm honestly not sure. The patch was for Unmanaged.dll, which is the same file affected by patch 6 that didn't work right and then the later patch that undid patch 6 which is what I have in the patch archive now. It's entirely possible that the HDHR fixes aren't in that version of the file. Go ahead and put in the Unmanaged.dll from the HDHR thread and let me know if it fixes your problem.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
skreien
Offline

Member

Posts: 161
Threads: 41
Joined: Jan 2005
#55
2010-09-14, 07:42 PM
I see lines in my logfiles about skipping detection, so whatever version is in the cumulative patch must have it in it.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#56
2010-09-14, 11:08 PM
the skip detection was introduced in 1.5.28
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
skreien
Offline

Member

Posts: 161
Threads: 41
Joined: Jan 2005
#57
2010-09-15, 01:54 AM
I meant that I see text reflecting whurlston's suggestion from that thread, which sub implemented, "bypass the routine to autodetect the capture filter".
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#58
2010-09-15, 03:05 AM
Oh, I see, I misunderstood.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
HarryH3
Offline

Posting Freak

U.S.A
Posts: 925
Threads: 56
Joined: Mar 2006
#59
2010-09-17, 06:21 PM
I tried out your PostProcessing.bat file and found one problem. The file tasklist.exe, which is called in the batch file, doesn't come with XP Home. Just another bit of stupidity on Microsoft's part... Anyway, I found a copy online at http://www.computerhope.com/download/winxp.htm and copied it to my Windows folder. Just thought you might want to update that note (It's at reply #52) to help other folks that might want to use it. Smile
i3-3570k, 8GB RAM, Win10 Pro, Nvidia GT710, HDHomeRun (OTA), NPVR 6.x
On a clear disk, you can seek forever...
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#60
2010-09-17, 09:05 PM
thanks Harry; btw, I've always gotten a chuckle out of your signature, makes me smile every time.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (16): « Previous 1 … 4 5 6 7 8 … 16 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  npvr is not responding johndutcher 3 1,558 2022-05-05, 07:57 PM
Last Post: sub
  NPVR 4.2.4 Video Library No Longer Shows folder.jpg Lao Pan 12 4,018 2022-04-14, 04:33 AM
Last Post: Antmannz
  nPVR Continually Wakes PC bfos 23 11,552 2022-02-17, 03:48 PM
Last Post: sub
  Can't find tuner filter in NPVR 4.05 on old XP machine (eee 701) with RTL2832U iamanotheruser 3 1,788 2022-01-03, 04:45 AM
Last Post: mvallevand
  Streaming Services with NPVR tesla1886 4 2,794 2021-01-04, 02:58 AM
Last Post: tesla1886
  NPVR choosing incorrect xml guide display-name after reboot drlava 7 3,207 2020-12-27, 02:27 AM
Last Post: sub
  Can NPVR offset only 3 channel listings in EPG? acemib 20 7,357 2020-04-27, 01:28 PM
Last Post: mvallevand
  Import recorded tv shows to NPVR mattman1968 9 6,188 2020-03-03, 12:57 PM
Last Post: Jimixter
  Easiest way to migrate NPVR to a new machine JP23 1 2,015 2020-02-24, 04:55 PM
Last Post: sub
  NPVR Hangs when Changing Channels BorchertD 2 1,745 2020-01-11, 11:37 PM
Last Post: BorchertD

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode