How to use FFMPEG on multiple files | Apply bulk / batch ffmpeg effects on multiple videos

Published: 04 July 2022
on channel: The FFMPEG guy
1,782
39

Today, we show how to apply FFMPEG video effects (VFX) on multiple files so that you can take care of hundreds of videos in 1 single batch and 1 single command. So, no more need to spend hours doing tedious work and handling each videos individually: you can now use ffmpeg on multiple files in 1 go. All parameters shown can be of course fully customized to suit your needs. Enjoy!

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLE
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ The following command (as seen in a previous tutorial), converts 1 video file «001.avi» to «001.mp4» (H.264) at 1920x1080 (Full HD), 29.97 frames per second while minimizing conversion loss (crf default is 23):
→ ffmpeg -i 001.avi -crf 17 -ar 48000 -s 1920x1080 -r 29.97 001.mp4

BUT, WHAT IF we now need to apply the same FFMPEG command to 100+ files???
Well, simply use the following batch conversion command at the DOS command (cmd) or "FF prompt":

→ for %f in ("*.avi") do ffmpeg -i "%f" -crf 17 -ar 48000 -s 1920x1080 -r 29.97 "%~nf.mp4"

with:
* %f = Our filename variable
* for %f in ("*.avi") do = For every *.avi files in the ffmpeg.exe folder, …
* ffmpeg -i "%f" -crf 17 -ar 48000 -s 1920x1080 -r 29.97 = … execute the "ffmpeg conversion to .mp4" command seen earlier…
* "%~nf.mp4" = … outputting the result to the same filename with extension .mp4 this time. Note: all files will end up in the same folder

MORE OPTIONS
→ for %f in (“INPUT/*.avi") do ffmpeg -i "%f" -crf 17 -ar 48000 -s 1920x1080 -r 29.97 “%~nf.mp4"
with:
* INPUT/ = Specify input folder for *.avi files (relative path)

→ for %f in (“INPUT/*.avi") do ffmpeg -i "%f" -crf 17 -ar 48000 -s 1920x1080 -r 29.97 “OUTPUT/%~nf.mp4"
with:
* OUTPUT/ = Specify output folder for *.mp4 files (relative path)

→ for %f in ("C:\INPUT\*avi") do ffmpeg -i "%f" -crf 17 -ar 48000 -s 1920x1080 -r 29.97 "C:\OUTPUT\%~nf.mp4"
with:
* C:\INPUT\ = Specify full path to output files
* C:\OUTPUT\ = Specify full path to input files
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
   • ALL THE VIDEOS FROM THE CHANNEL  
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ One More Time - Ofshane
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Watch video How to use FFMPEG on multiple files | Apply bulk / batch ffmpeg effects on multiple videos online without registration, duration hours minute second in high quality. This video was added by user The FFMPEG guy 04 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,782 once and liked it 39 people.