On this .ogg
files
$ tree
.
├── Disc 1 - 01 - Procrastination.ogg
├── Disc 1 - 02 - À carreaux !.ogg
├── Disc 1 - 03 - Météo marine.ogg
└── mp3
I try with a while
loop to ffmpeg convert them to mp3 keeping spaces in filenames::
$ ls *.ogg | while read line; do ffmpeg -i "$line" mp3/"$line".mp3 ; done
But I get this error::
$ ls *.ogg | while read line; do ffmpeg -i "$line" mp3/"$line".mp3 ; done
...
Parse error, at least 3 arguments were expected, only 0 given
in string ' 1 - 02 - À carreaux !.ogg' ...
...
This report bash ffmpeg find and spaces in filenames even if it look similar is for a more complicate script and has no answer.
This ffmpeg not working with filenames that have whitespace only fix it when output is a http:// URL