Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 28th December 2023, 14:56   #1  |  Link
Lan4
Registered User
 
Join Date: Dec 2022
Posts: 64
Limit the number of cores for encoding

I want to limit the number of cores. In total I have 4 cores and 8 threads. I only need 6 threads for video encoding in the background (this is 80% of the computerís power), and at this time I use the remaining threads for other work. I can change the number of processors in the Task Manager, but I have to do this every time. I wanted to do this automatically.

Now I'm trying this:
Code:
start /affinity 3F C:\ffmpeg.exe
A separate cmd window opens, which does not have the usual FFMPEG encoding log. And perhaps not all script options are used. How to do it correctly?

In general, the FFMPEG script looks like this:

Code:
FOR %%F IN (*.mp4) DO (
echo LSMASHVideoSource("%%~dpnxF"^) > "%%~dpnxF.avs"
echo SetFilterMTMode("DEFAULT_MT_MODE", 2^) >> "%%~dpnxF.avs"
echo LoadPlugin("D:\ResampleMT.dll"^) Spline36ResizeMT(720, 1280, prefetch=4^) >> "%%~dpnxF.avs"
echo KNLMeansCL(D=1, A=1, h=1.5, device_type="auto"^) >> "%%~dpnxF.avs"
echo DetailSharpen(str=0.3, pow=8, z=6, ldmp=0, mode=1, med=false^) >> "%%~dpnxF.avs"
echo Prefetch(6^) >> "%%~dpnxF.avs"
C:\ffmpeg.exe -benchmark -i "%%~dpnxF.avs" -i "%%~dpnxF" -map 0:v:0 -map 1:a:0 -c:v libx264 -qp 26 -preset medium -g 30 -keyint_min 5 -c:a copy "%%~dpnF_new.mp4"
del "%%~dpnxF.avs"
)
pause
Lan4 is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.