chinayehuo 发表于 2018-12-5 21:50:32

ffmpeg命令行怎么连续压缩

ffmpeg -i test.avi test.mp4   这样是简单的压缩,但我如果有test1.avi   test2.avi ......很多视频文件要转码的话怎么写代码?
测试ffmpeg -i test.avi test.mp4 -i test1.avi test1.mp4 -i test1.avi test1.mp4   这样格式的话都是在压test.avi.

孙悟空 发表于 2018-12-6 13:30:42

find . -name *.avi -exec ffmpeg -i {} {}_output.mp4 \;

例子:
find ~/Movies/Test/ -name "*.ts" -exec ffmpeg -i {} -c copy -y -t 20 {}_output.mp4 \;

chinayehuo 发表于 2018-12-6 15:54:22

这个代码怎么用的?
ffmpeg -i test.avi test.mp4这种直接在cmd运行就可以了

chinayehuo 发表于 2018-12-6 21:25:13

我用批处理解决了,你这个好复杂看不懂
页: [1]
查看完整版本: ffmpeg命令行怎么连续压缩