Code:
find . -name '*.AVI' -exec ffmpeg -i {} -b 1600k {}.mpeg \;
Using ffmpeg to encode video for my Android phone:
find . -iname "*" -exec ffmpeg -i {} -s 480x320 -vcodec mpeg4 \ -acodec aac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 \ -strict experimental {}.mp4 \;
Explanation:
find command searches for all files with AVI extention and for each of them executes command after —exec switch (which is ffmpeg -i input file -b bit rate). Curly brackets stand for currently found file.