Execute “ffmpeg” command in a loop

前端 未结 3 895
小鲜肉
小鲜肉 2020-11-27 19:30

I have three .wav files in my folder and I want to convert them into .mp3 with ffmpeg.

I wrote this bash script, but when I execute it, onl

3条回答
  •  悲哀的现实
    2020-11-27 20:15

    Use the -nostdin flag in the ffmpeg command line:

    ffmpeg -nostdin -i "$name.wav" -ab 320k -ac 2 "$name.mp3"
    

    See the -stdin/-nostdin flags in the ffmpeg documentation ➠ https://ffmpeg.org/ffmpeg.html

提交回复
热议问题