0
I am trying to covert mp3 file into mp4 files with a for loop. 
The files are in the same directory where for loop is running is running.

for f in *.mp3; do ffmpeg -i "$f" -c:a libmp3lame "outputs/${f%.mp3}.mp4"; done
I am getting an error:
No such file or directory

I am able to convert files with ffmpeg one by one with this command. It seems that ffmpeg gets the full name from just the name of the file, but in the loop that does not happen

ffmpeg.exe -loop 1 -i .\Plutarch.jpg -i 'Plutarh.mp3' -shortest -c:v libx264 -c:a copy result.mkv
LetzerWille
  • 5,355
  • 4
  • 23
  • 26
  • Is this Windows or Unix? your manual command says `ffmpeg.exe` but your loop says `ffmpeg`. Could it be that "No such file or directory" refers to `ffmpeg`? – root Sep 24 '22 at 02:55
  • put an `echo` before the `ffmpeg` and see what it shows, otherewise put tthat code in a script and add `set -x` – Jetchisel Sep 24 '22 at 04:13

0 Answers0