如何使用ffmpeg从命令行批量转换 [英] How to batch convert using ffmpeg from command line
本文介绍了如何使用ffmpeg从命令行批量转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ffmpeg -i AlbumCover.png -i AnglersTunnel.flac AnglersTunnel.flv
我有一个完整的文件夹填充其他声音,我想以完全相同的方式处理。如何在整个文件夹上执行此一行?每个声音文件只能使用1个图像文件。输出视频文件名称应与音频文件名称相同。
解决方案
do
ffmpeg -i AlbumCover.png -i$ i$ {i %%。*}。flv
done
I have this nice one-liner to merge an image & sound and create a video:
ffmpeg -i AlbumCover.png -i AnglersTunnel.flac AnglersTunnel.flv
I have an entire folder filled with other sounds I want to process in the exact same way. How can I perform this one-liner on my entire folder? There is only 1 image file to use for every sound file. the output video file name should be the same as the audio file name.
解决方案
for i in *.flac; do
ffmpeg -i AlbumCover.png -i "$i" "${i%%.*}.flv"
done
这篇关于如何使用ffmpeg从命令行批量转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文