0

I am a newbie to this forum and am hoping I can get some insight and assistance with an issue I am having. I wrote a script that takes all of my captured videos (.avi) and converts them to mp4 using ffmpeg. When I run the script by double clicking the file, it runs good at about 45 FPS using about 85% of my CPU. I created a task in Windows 10 Task Scheduler and when I run the file from there, it only converts between 1.5-2 FPS utilizing only 3% of my CPU and I have no idea why. Obviously, that conversion rate is not acceptable. Here is the script file which also shows all the ffmpeg parameters I have passed in:

@echo off
for %%a in ("D:\Aaron Cirlin\Videos\Captured Movies\*.avi") do 
"C:\Program Files\WinFF\ffmpeg" -y -i "%%a" -itsoffset 0.765 -i "%%a" -map 1:0 -map 0:1 -crf 20.0 -vcodec libx264 -filter:v scale=1280:720 -preset slow -acodec libvo_aacenc -ar 48000 -b:a 128k -coder 1 -flags +loop -cmp chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0 "D:\Aaron Cirlin\Videos\Movies\%%~na.mp4" & del "%%a"
pause

Does anyone know why it would that much slower via the Task Scheduler?

Any help would be greatly appreciated.

  • 3
    I think this is related to Windows process management rather than FFmpeg. Better suited to Super User. – Gyan Aug 29 '16 at 5:48
  • What's your reason for including everything from -coder to -threads? All of these are default or already covered by your preset and are therefore unecessary or even suboptimal. – llogan Nov 30 '16 at 0:35
1

I was able to change the priority level by exporting the task and editing the XML file, then deleting the initial task and re-creating task by importing the edited XML file. Worked like a charm.

  • Be careful with task priorities. You can crash your system. – DigiVision Media Jan 28 '17 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.