Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

linux - batch conversion from .h264 to .avi using ffmpeg


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 !


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...