Execute “ffmpeg” command in a loop [duplicate]

Use the -nostdin flag to disable interactive mode,

ffmpeg -nostdin -i "$f" -ab 320k -ac 2 "${f%.*}.mp3"

or have ffmpeg read its input from the controlling terminal instead of stdin.

ffmpeg -i "$f" -ab 320k -ac 2 "${f%.*}.mp3" </dev/tty

See the -stdin/-nostdin flags in the ffmpeg documentation

Leave a Comment