If you are using bash:
cd /the/dir/the/h264/videos/are/in
for input in *.h264; do ffmpeg -i $input -q:v 6 ${input/.h264/_2.avi}; done
In Windows default shell:
for %%input in (*.h264) do ffmpeg %%input -q:v 6 %input:.h264=_2.avi%
Couldn't test the windows sample, as i do not have a windows machine !
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…