How do I encode multiple video files in one batch with ffmpeg
, using the same settings?
I found this one-line solution that converts .avi files in the current folder to .mov. Note that I want to encode .mov -> .mov
:
for i in *.mov; do ffmpeg -i "$i" "${i%.mov}.mov" ; done
I wish to use the following settings for encoding:
ffmpeg -i "$i" -c:v libx265 -preset ultrafast -crf 20 -af "volume=25dB, highpass=f=200, equalizer=f=50:width_type=h:width=100:g=-15" -c:a aac -strict experimental -b:a 192k OUTPUT-ENCODED.MOV
Possible ways to prevent overwriting:
- Add
-ENCODED
to the end of the filename before the file extension - Rename the files to something sequential, like
OUTPUT01.MOV
,OUTPUT02.MOV
, etc - Put the encoded files in a directory subfolder but with the same file names