windows – ffmpeg multiple files at once

I have this FFmepg script in a batch file:

for %%a in ("*.mp4*") do ffmpeg -i "%%a" -y -c:v prores_ks -profile:v proxy -pix_fmt yuv422p10le -vendor ap10 -bits_per_mb 8000  -vf "scale=1920:1080" -c:a pcm_s16le -ar 48K "..\%%~na.mov"

It renders all .mp4 files in the folder it is in to .mov and drops it in the previous folder.

The issue is that I wanted to optimize the process and take more advantage of the hardware, rendering 4 videos at the same time, but I didn’t find a way to write the script so that it analyzes how many .mp4 there are in the folder and divides these files into 4 ffmpeg instances.

Any idea how I can do this?

Read more here: Source link