NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums General General Discussion v
« Previous 1 … 13 14 15 16 17 … 159 Next »
windows 7 unattended sleep and comskip

 
  • 0 Vote(s) - 0 Average
windows 7 unattended sleep and comskip
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#1
2014-07-24, 01:28 AM (This post was last modified: 2014-07-24, 01:49 AM by jam_zhou.)
So, I think I've finally figured out why comskip isn't working all the time. It's because of the windows unattended sleep function. When it wakes up to record NPVR keeps it awake for the duration of the recording but not for when the show is over and comskip is still running. As result, when I check it sometimes the comskip file is not complete and I think comskip is at fault when in fact it is Windows that's causing the problem.

I'm testing a solution that should work, but I would like to ask others how they've dealt with this issue.

I tell it to enter high performance power scheme so that it doesn't go to sleep, wait for comskip to finish, if there's a comskip task still running leave it in high performance but if there's no comskip then bring it back to balanced where it'll go to sleep in 25 minutes.

Here's my parallelprocessing.bat:

cd /d C:\Users\Public\NPVR\Scripts

echo high performance %Date% %TIME% %1 >>logtest.txt

REM high performance
powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

echo start comskip %Date% %TIME% %1 >>logtest.txt

comskip %1

echo end comskip %Date% %TIME% %1 >>logtest.txt

tasklist /nh /fi "imagename eq comskip.exe" | find /i "comskip.exe"
if errorlevel 0 if not errorlevel 1 goto IsRunning

:exit
echo changing to balanced %Date% %TIME% %1 >>logtest.txt
REM Balanced
powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e
exit

:IsRunning
echo comskip running %Date% %TIME% %1 >>logtest.txt

echo keeping high performance %Date% %TIME% %1 >>logtest.txt

REM high performance
powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
exit
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#2
2014-07-26, 05:20 PM
update.

it does not work very well. The system still goes to sleep Sad

Sub, how do you keep windows awake for recordings? I've noticed that there's an option in the config to keep windows awake, is there a way for you to make that a utility which has a command line to basically enable and disable keep awake?

Thanks.
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#3
2014-07-26, 05:42 PM
jam_zhou Wrote:Sub, how do you keep windows awake for recordings?
While the system is doing stuff that needs the machine to stay awake, I'm regularly calling "SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED)" to tell Windows to stay awake.

Quote:I've noticed that there's an option in the config to keep windows awake, is there a way for you to make that a utility which has a command line to basically enable and disable keep awake
Sorry, this isn't something I'd like to create for you. I don't think the method I'm using would suit what you're trying to do.
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#4
2014-08-09, 03:57 AM
Ok, so I got this program called caffeine that is supposed to press F15 every 59 seconds to keep windows awake. I've tested it and it looks like it's working and I've added it to my parallelprocessing.bat but for the life of me the batch file doesn't run caffeine.exe properly. It acts like the executable isn't even there because the icon does not toggle. I've attached caffeine.exe as well as my batch file. Any ideas on why it's not working? When I manually start the batch file it runs caffeine properly, but when I do a recording it does not.

I have caffeine start on windows startup...

caffeine.exe -startoff

source: http://www.zhornsoftware.co.uk/caffeine/
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#5
2014-08-09, 10:18 AM
Sounds a bit like like the videoredo problem I'm currently playing with from postprocessing.bat
I bet it revolves round the fact that the scripts run under the SYSTEM account from services rather than a user account when manually run.
(sorry, I have no solution as yet).
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#6
2014-08-12, 01:33 AM
how is everyone else dealing with windows unattended wake up making the system going back to sleep before comskip is finished?

I'm really at a loss as to how to solve this problem.
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#7
2014-08-13, 02:47 AM
I found another program called insomnia.

http://dlaa.me/blog/post/9901642

It uses the code that Sub uses so it should work.

So far, it's being called from parallelprocessing.bat...hoping to see it work and I'll report back in a few days.
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#8
2014-08-13, 09:06 AM
jam_zhou Wrote:I found another program called insomnia.

But doesn't it need it's window closing manually when our task is finished to revert to going to sleep mode?
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#9
2014-08-13, 02:22 PM
I just use taskkill /im /f insomia.exe once all comskip instances have finished.
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#10
2014-08-28, 01:47 AM
Ok, I think I've finally got it working...it's been running for about a week now...onto the next problem WoL.


Here's my parallelprocessing.bat which calls checkprocesses.bat.

I used a program called insomnia (link above)

parallelprocessing.bat:

cd /d C:\Users\Public\NPVR\Scripts

echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++>>logtest.txt

echo %Date% %TIME% start insomnia %1 >>logtest.txt

start /MIN Insomnia.exe

echo %Date% %TIME% start comskip %1 >>logtest.txt

comskip %1

echo %Date% %TIME% check for %~dpn1.edl >>logtest.txt

if exist "%~dpn1.edl" goto cont

:redo
echo %Date% %TIME% ERROR EDL does not exist redo comskip %~dpn1.edl >>logtest.txt
echo %Date% %TIME% ERROR EDL does not exist redo comskip %~dpn1.edl >>logtest_comskip_ERROR.txt
waitfor skytofall /t %2
comskip %1

if exist "%~dpn1.edl" goto cont
echo %Date% %TIME% ERROR could not create EDL %~dpn1.edl >>logtest.txt

:cont
echo %Date% %TIME% end comskip %1 >>logtest.txt

REM get rid of excess comskip files... we only need the .edl
del "%~dpn1.log"
del "%~dpn1.txt"
del "%~dpn1.logo.txt"

"C:\Program Files (x86)\NPVR\ImageGrabLite.exe" --nfo --rename --zap2it --oid %3

echo %Date% %TIME% renamed %1 >>logtest.txt


checkprocesses.bat

------------------------------------------------------------------------------------------------------------------------

Checkprocesses.bat:

cd /d C:\Users\Public\NPVR\Scripts

echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>logtest.txt

echo %Date% %TIME% check comskip %1>>logtest.txt

tasklist /nh /fi "imagename eq comskip.exe" | find /i "comskip.exe"
if errorlevel 0 if not errorlevel 1 goto IsRunning

echo %Date% %TIME% %1 check handbrake %1 >>logtest.txt

tasklist /nh /fi "imagename eq handbrakecli.exe" | find /i "handbrakecli.exe"
if errorlevel 0 if not errorlevel 1 goto IsRunning

:exit
echo %Date% %TIME% no processes kill insomnia %1 >>logtest.txt
taskkill /f /im "insomnia.exe"
tasklist /nh /fi "imagename eq insomnia.exe" | find /i "insomnia.exe"
if errorlevel 0 if not errorlevel 1 goto InsomniaStillRunning
echo %Date% %TIME% SUCCESS kill insomnia %1 >>logtest.txt
exit

:IsRunning
tasklist /nh /fi "imagename eq insomnia.exe" | find /i "insomnia.exe"
if errorlevel 0 if not errorlevel 1 goto InsomniaRunning
echo %Date% %TIME% process is running start insomnia %1 >>logtest.txt
start /MIN Insomnia.exe
exit

:InsomniaRunning
echo %Date% %TIME% process is running stay awake %1 >>logtest.txt
exit

:InsomniaStillRunning
echo %Date% %TIME% ERROR could not kill insomnia %1 >>logtest.txt
exit
E6400, 2 GB RAM ,500 GB + 250 GB HD, PVR150+ Adaptec 3610, RW 2 + HIP, Antec 2480 w/ mini ninja ...still using v 0.99
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple PIP windows in Firefox Graham 0 1,672 2020-09-25, 11:45 AM
Last Post: Graham
  Comskip config file spudjg1 0 2,022 2019-08-26, 02:49 PM
Last Post: spudjg1
  Why Do People Upgrade to Windows 10? ga_mueller 12 7,965 2019-08-11, 01:21 PM
Last Post: Ludron
  Windows 10 Ramdrive for buffer PaulW 1 1,683 2018-10-16, 10:45 PM
Last Post: gEd
  comskip and nextpvr padding Jonsnow 1 1,885 2018-10-11, 10:19 PM
Last Post: mvallevand
  Fine tune Comskip for dual episode screen endings p37307 2 1,996 2018-03-19, 07:57 PM
Last Post: p37307
  Downgrade Windows Reddwarf 9 4,290 2017-05-26, 07:12 PM
Last Post: tonyjohn29
  Windows 10 Preview removes command prompt p37307 13 5,458 2016-12-10, 03:49 AM
Last Post: johnsonx42
  Windows 10 Update September 29, 2016 — KB3194496 p37307 0 2,596 2016-09-30, 09:32 AM
Last Post: p37307
  Windows 10 Anniversary NPVR fullscreen flicker and freeze fix p37307 1 3,145 2016-08-11, 02:59 AM
Last Post: sub

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

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

Linear Mode
Threaded Mode