This is driving me crazy.
I have a bunch of mp3 that I want to transcode using ffmpeg
.
I'm trying to use this one-liner (the script is bigger, this is the problematic section):
find . -type f \( -iname \*.mp3 \) | parallel ffmpeg -i "{}" -acodec libmp3lame -ab 128k "$output_folder_with_spaces/{.}-128k.mp3" \;
(The iname
section is there because in the future more extensions will maybe be used)
But even using the quotes in {}
, I always get No such file or directory
, cause the mp3 is named 01 - My song
. And I don't know if "$output_folder_with_spaces"
is going to work either.
I've googled a lot, but can't find this example: using {}
from find
that {}
has spaces. I've only found when using a variable or hardcoded paths in quotes.
Anyone knows how I can solve this space problem, in this scenario?
-exec
-ingffmpeg
on the results of thefind
command, rather than piping them to it?