NextPVR Forums

Full Version: PC to standby during PostProcessing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
NPVR has code to keep the PC awake while recording, right?
Does this code also keep it awake when running PostProcessing.bat?
I do a conversion to .mpg, which can take a while, and I noticed the PC was asleep in the middle.

Any chance of keeping the PC awake until post processing completes?
You could have two power schemes (I have "gbpvr" and "always on") and switch to one or the other with powercfg at the start and end of the batch file ??
run this beginning of script:
powercfg -change -standby-timeout-ac 0 [changes sleep timeout to never..]
and this at end of script:
powercfg -change -standby-timeout-ac 15 [changes it to 15 mins...edit that to be your preferred timeout till sleep mode]
Logically I think this is something that NPVR must control otherwise when there are simultaneous recordings a short recording could turn power management back on.

Martin
true...not good to do things that take long time in postproc..
better to just write filename to a que and process independently..i do that for comskip so only 1 runs at a time..[comskip on h264 is painfully slow and cpu intense]
so w/only 1 process to do all files, powercfg will work fine..

hmmm, instead try this for postprocessing.bat:
Code:
powercfg -change -standby-timeout-ac 0

[your code]

tasklist /FI "IMAGENAME eq ffmpeg.exe" 2>NUL | find /I /N "ffmpeg.exe">NUL
if not "%ERRORLEVEL%"=="0"  powercfg -change -standby-timeout-ac 15
rem checks if ffmpeg.exe running and only runs sleep if it isn't...
if you use something other than ffmpeg.exe then replace ffmpeg.exe with your exe...[could also just use cmd.exe]
that should work in your existing postproc script..it makes sure it doesn't turn on sleep mode if another ffmpeg is still running..
Big Grin

p.s. haven't tested in 7 but the tasklist is still there so it should...let me know..
I suppose in theory it could be argued that the software running in postprocessing should keep the system awake ??
martint123 Wrote:I suppose in theory it could be argued that the software running in postprocessing should keep the system awake ??

It doesn't seem to work that way, some input (keyboard, mouse etc) seem to be required.