Convert ImageMagick and GNU in parallel

I would like to speed up the following command:

convert -limit memory 64 -limit map 128 -antialias -delay 1x2 final/*.png movie.mp4

I saw other blog posts where they converted in parallel, so I'm wondering how to get it to work with the above command.

+4
source share
1 answer

If the downsizing option is an option, yes, you can easily do it with GNU Parallel

parallel -j 8 convert {} -resize ... {} ::: *.png

where {}denotes the file name, and the files to be processed are listed after :::.

-j sets the number of tasks to be executed in parallel.

100 PNG 10 000 x 8000 2000 x 1200 8 ,

#!/bin/bash
for f in *.png; do
    convert $f -resize 2000x1200! $f
done

, GNU Parallel

parallel convert {} -resize 2000x1200! {} ::: *.png

3 40 . , 100 PNG , 52 .

+8

All Articles