Some notes for self reference.
Batch video conversion
Using some a simple loop (in bash)
for f in *.mp4; do ffmpeg -i “${f}” -b 4000k -s 4cif -vcodec h263 -acodec aac -y “${f}_4000.3gp”; done;
Converts all mp4 files in the current folder
Original file name: file_one.mp4
Converted file name: file_one.mp4_4000.3gp
Convert to 3gp
ffmpeg -i file_name -s 4cif -vcodec h263 -acodec aac -y converted.3gp
Convert to with a set bit-rate
When the set bit rate is 4000k (kilo bits)
ffmpeg -i file_name -b 4000k -s 4cif -vcodec h263 -acodec aac -y converted.3gp
Setting resolution
Use the -s flag to set the resoultion. For possible values refer: http://ffmpeg.org/ffmpeg-doc.html





Thank for you tut!
But how can I specify amr format for -acodec option? I’ve tried some codec such as `amrnb` and `amrwb`, but both got fault!
Comment by xuansamdinh — August 13, 2012 @ 5:45 am