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 … 359 360 361 362 363 … 433 Next »
comskip batch file

comskip batch file
stustunz
Offline

Posting Freak

Posts: 5,111
Threads: 112
Joined: Oct 2006
#1
2011-01-19, 01:54 AM
can some post simple instructions of where the files go
and a simple postprocessing.bat example to run comskip

SIMPLE
cant be arsed fiddling
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#2
2011-01-19, 03:33 AM
There's plenty about that in the sticky linked in my signature, post #3. I have a nice batch file for running comskip linked there as well. It looks very complicated, because it includes a bunch of logging and some code to ensure that no more than 2 comskips can run at once. However, the whole thing really just boils down to this:
Code:
cd c:\comskip
comskip %1
So you just put the comskip files in c:\comskip, put the commands above in postprocessing.bat, and you're done.
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
stustunz
Offline

Posting Freak

Posts: 5,111
Threads: 112
Joined: Oct 2006
#3
2011-01-19, 03:42 AM
Cheers thats what i was after

I have used your other one but have no idea what half of it does
i just hack my way through everything till it works
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#4
2011-01-19, 04:56 AM (This post was last modified: 2011-01-19, 05:00 AM by johnsonx42.)
if you'd like to use mine, but without any of the fluff or the stuff that's specific to my system here it is:
Code:
@echo off
cd c:\comskip
echo %date%,%time% - PostProcessing.bat invoked on %1 recorded from channel %2 >>processing.log

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

echo %date%,%time% - invoking comskip on %1 >>processing.log
comskip %1
echo %date%,%time% - comskip finished with %1 >>processing.log
The processing.log file will keep growing, but it's only a few lines of text per show so it will take years before it gets problematically large. I do delete mine every now and again though.

edit: don't forget though if you do use mine, you will still need the Sleep command (or some other similar command, I think there's one floating around called "timeout"). there's a link to it in the original post. also if you don't have a pro/business/ultimate version of windows you'll need to download the tasklist command, again there's a link in the original post.
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
stustunz
Offline

Posting Freak

Posts: 5,111
Threads: 112
Joined: Oct 2006
#5
2011-01-19, 05:08 AM
ill let it run tonight and see what results i get
i seem to be getting files created by comskip so far
thanks for the info
im just not that smart and all this change is doing my head in today
roy
Offline

Posting Freak

Posts: 830
Threads: 95
Joined: Sep 2005
#6
2011-01-19, 05:16 PM
Since you brought it up...I've been using your .bat file for parallelprocessing.bat, and was wondering about the "sleep %2". I have numbered my digital stations as "2561" (for channel 56.1), so does this make comskip pause for 42 minutes? I have had some recordings not get processed, and then there are others (the Daily Show, every night) that do get processed in progress, but the cuts don't show up until the recording is complete, while others do show cuts while the recording is still in progress.

I will try your revised .bat from above tonight to see if there is any change. This should work in parallelprocessing.bat, correct? This is on my new "Win7 Home" installation, so I guess I need to check for the "sleep" command.
What, me worry?

MSI H270 PC Mate | Core i3-7100 | 16GB RAM | 275GB M.2 2280 SSD | 4TB + 2TB HDD | Zalman Z3 Case | Win10
HDHR Prime | HVR2250 | PCH A-110 | PCH A-100 | Harmony 650 & 700 remotes | Comcast | Schedules Direct
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#7
2011-01-19, 05:24 PM
Yes, if you sleep %2 and your channels have high channel numbers, it will sleep for a VERY long time. I mentioned that in the notes of the original post. Check the sleep command help (sleep /? I imagine), there's a way to have it sleep in milliseconds rather than seconds.

With the new version that uses the %3.txt to store the temporary comskip count, the only consequence of simply not sleeping at all is that sometimes you'll get an extra comskip running if both recordings end at precisely the same moment.

I'm not sure I follow you about showing cuts while a recording is still in progress... to my knowledge neither NPVR nor GB-PVR would do that.
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
roy
Offline

Posting Freak

Posts: 830
Threads: 95
Joined: Sep 2005
#8
2011-01-19, 06:10 PM
Yes, I just reread your post and saw the info. I will fiddle with the .bat tonight.

Comskip has always worked for me to show cuts on in progress recordings. With GB-PVR, just the live_tv=1 parameter in comskip.ini worked. Now with nPVR and parallelprocessing.bat it does still work, most of the time. I'll see if I can figure it out.

Thanks.

edit: Yes, sleep.exe [-m] is milliseconds
What, me worry?

MSI H270 PC Mate | Core i3-7100 | 16GB RAM | 275GB M.2 2280 SSD | 4TB + 2TB HDD | Zalman Z3 Case | Win10
HDHR Prime | HVR2250 | PCH A-110 | PCH A-100 | Harmony 650 & 700 remotes | Comcast | Schedules Direct
dvasco
Offline

Senior Member

Posts: 718
Threads: 113
Joined: Jun 2006
#9
2011-06-22, 10:27 PM (This post was last modified: 2011-06-22, 10:32 PM by dvasco.)
johnsonx42 Wrote:if you'd like to use mine, but without any of the fluff or the stuff that's specific to my system here it is:
Code:
@echo off
cd c:\comskip
echo %date%,%time% - PostProcessing.bat invoked on %1 recorded from channel %2 >>processing.log

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

echo %date%,%time% - invoking comskip on %1 >>processing.log
comskip %1
echo %date%,%time% - comskip finished with %1 >>processing.log
The processing.log file will keep growing, but it's only a few lines of text per show so it will take years before it gets problematically large. I do delete mine every now and again though.

edit: don't forget though if you do use mine, you will still need the Sleep command (or some other similar command, I think there's one floating around called "timeout"). there's a link to it in the original post. also if you don't have a pro/business/ultimate version of windows you'll need to download the tasklist command, again there's a link in the original post.

Can it be used as is for parallelprocessing.bat? What happens when more than one instance of comskip runs at a time?
[SIZE="1"] [COLOR="Blue"]
NPVR | Athlon XP 5000+ 2 GB RAM | Asus EAH3450 | Hauppauge HVR-1600 & Colossus | MS MCE Beanbag
Harmony 659 | RF keyboard | Vizio 42" LCD & Panasonic 32" CRT | 3 PCH A-100 [/COLOR][/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  incorrect frequency in adelaide .ini file spin35 5 3,017 2023-02-01, 05:40 PM
Last Post: sub
  Comskip Playback Odd Behavior kirschey 3 1,681 2021-09-27, 06:16 PM
Last Post: sub
  Fast-forward and comskip issues manic_biker 11 3,829 2021-07-12, 02:17 AM
Last Post: Robazz
  ts file shows length too long? SuttonWillow 2 1,896 2021-03-15, 01:56 PM
Last Post: mvallevand
  Unhandled Exception: file name too long (idiots at pbs made it super long) jobby99 1 1,394 2020-10-29, 09:40 PM
Last Post: mvallevand
  ts file shows length too long SamM 4 2,327 2020-10-06, 02:45 AM
Last Post: Ehrlichia
  EPG displaying small subset of xmltv file. Esteban 9 3,009 2020-07-18, 10:07 PM
Last Post: Esteban
  Max File Size jrockow 2 1,516 2020-04-21, 02:38 PM
Last Post: jrockow
  Skip causes fast-forward to the end of the file madbrain 9 3,841 2020-02-27, 10:24 PM
Last Post: Esch
  Be notified when EPG (xml file) is empty ? nonob 2 1,416 2020-02-14, 05:00 PM
Last Post: nonob

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

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

Linear Mode
Threaded Mode