1

I use the following code to convert WAV to ALAC (bash, macOS 10.12.1):

find . -type f -iname "*.wav" | while read fn; do ffmpeg -i "$fn" -acodec alac "${fn%.wav}.m4a"; done

But there seems to be a mistake since it prints warnings like this:

n---8085/03_Part_III.wav: No such file or directory

The correct path would be:

Bad_Religion/wav/Bad_Religion---8085/03_Part_III.wav

For some reason the path is truncated.

What's wrong with the command?

1

Your file names are not actually being truncated. Here, ffmpeg is trying to read commands from its input stream. Unfortunately, this is the same stream read is using to determine filenames, so it appears that parts of these filenames are not being read. To fix this, you should tell ffmpeg to disable interaction on the input stream with the -nostdin flag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.