Everyone knows how length & resource hungry x264 encoding is & one can't resume it nor can watch any 1080 movie without the jitters in parallel with the encoding process. Luckily I cam across a nice CLI pausep.exe Here its usage
Quite simple.pausep PID [/r]
If you type only pausep without arguments, the program will display its usage and a list of running processes and their PID. If you type pausep PID, the program will call SuspendThread on all the process's threads. This will suspend the threads or increment their suspend count. If you pass the "/r" argument, the program will do the opposite action, i.e., resuming the thread.
Now onto a simple bat file
As you can see in the above script I have to manual enter the PID is there any cmd way to search for numbers only for instance we output findstr findings to a txt fileCode:@echo off pausep >temp.txt findstr /I "x264" temp.txt del temp.txt set /P "_pid=x264 PID: " set /P "_str1=Pause or resume (p/r): " if /I "%_str1%" == "p" ( pausep %_pid% ) if /I not "%_str1%" == "p" ( pausep %_pid% /r ) pause
then search temp2.txt & somehow make only the numbers (PID) fed to a variable?Code:findstr /I "x264" temp.txt >temp2.txt
A typical output of pausep
Code:PID 1676 DicterService.exe PID 1712 Connectifyd.exe PID 1720 conhost.exe PID 1832 taskhost.exe PID 1908 ekrn.exe PID 1932 dwm.exe PID 2012 explorer.exe PID 108 svchost.exe PID 260 svchost.exe PID 1288 svchost.exe PID 1328 svchost.exe
+ Reply to Thread
Results 1 to 6 of 6
Just lower the encoder to idle priority. You won't even notice it's running in the background. I run all my encodes at idle priority via a batch file:
Start /b /low x264.exe --etc
Last edited by jagabo; 6th Nov 2012 at 19:49.
Doesn't it have a lot to do with your systems power also ?
I have done X264 encodes (not many but a few) and played games, watched vid's etc. at the same time with no problems.
Or does it have to do with how or what you are encoding with ?
I really have no idea otherwise I would not be asking......Originally a member since 2001, LONG LIVE TARAN's!!!
It depends on how many cores/threads you have available vs. how many the programs can effectively use vs. any other bottlenecks. For example, X264 can effectively use all your CPU time (by spawning 1.5 times as many threads as you have cores) but if it's bottlenecked by a slow, single threaded, Avisynth filter all the x264 threads will be sitting idle most of the time waiting for the filter. That leaves a lot of CPU time for other processes.
Yes on very powerful machines you won't notice any jitter, however typical laptops are but inherently weak...
Why run 'always' on low priority - when you are sleep it must run on top most priority. Here I have finally make it automated:
@echo off pausep >temp.txt findstr /I "x264" temp.txt >temp1.txt for /f "tokens=2 delims= " %%g in ('type temp1.txt') do ( set _pid=%%g ) del temp.txt, temp1.txt set /P "_str1=Pause or resume (p/r): " if /I "%_str1%" == "p" ( pausep %_pid% ) if /I not "%_str1%" == "p" ( pausep %_pid% /r ) pause