How do you convert an entire directory with ffmpeg?

前端 未结 26 2086
长发绾君心
长发绾君心 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:57

    Getting a bit like code golf here, but since nearly all the answers so far are bash (barring one lonely cmd one), here's a windows cross-platform command that uses powershell (because awesome):

    ls *.avi|%{ ffmpeg -i $_  $_.name.replace($_.extension, ".mp4")}
    

    You can change *.avi to whatever matches your source footage.

提交回复
热议问题