How do you convert an entire directory with ffmpeg?

前端 未结 26 2608
长发绾君心
长发绾君心 2020-11-22 04:33

How do you convert an entire directory/folder with ffmpeg via command line or with a batch script?

26条回答
  •  我寻月下人不归
    2020-11-22 04:55

    For Linux and macOS this can be done in one line, using parameter expansion to change the filename extension of the output file:

    for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done
    

提交回复
热议问题