How do you convert an entire directory/folder with ffmpeg via command line or with a batch script?
If you have GNU parallel you could convert all .avi files below vid_dir
to mp4 in parallel, using all except one of your CPU cores with
find vid_dir -type f -name '*.avi' -not -empty -print0 |
parallel -0 -j -1 ffmpeg -loglevel fatal -i {} {.}.mp4
To convert from/to different formats, change '*.avi'
or .mp4
as needed. GNU parallel is listed in most Linux distributions' repositories in a package which is usually called parallel
.