I want to reduce the quality of a bunch of images at the time. With -q:v x
where x is a number between 1 and 30 (the bigger the number, the worse the quality). I'm able to save a lot of space even with x=1
. Now, when it comes to process multiple files, I'm stuck.
I've tried these two batch files:
mkdir processed
for f in *.jpg;
do name=`echo $i | cut -d'.' -f1`;
echo $name;
ffmpeg -i $i -q:v 1 processed/$name.jpg;
done
And
mkdir processed
for f in *.jpg;
do ffmpeg -i "$f" -q:v 1 processed/"${f%.jpg}.jpg";
done
Both just create the processed folder but nothing else.