0

I started using the answer to this question but the correct answer works only for the current directory and I would like to recurse through a tree. The answers given below the one I mention did not help. After research about the find command, I ended up trying

IFS=$'\0' && for f in `find -name "*.flac"`; do ffmpeg -i "$f"  -vf "crop=((in_w/2)*2):((in_h/2)*2)" -c:a alac "${f%.flac}.m4a"; done

Unfortunately, it does not work and I don't understand why: the output is just a list of ./path/file.flac but no conversion is done.

2
  • I'm voting to close this question as off-topic because this is about command line scripting
    – audionuma
    Apr 5 '20 at 6:36
  • you're getting warm but you need to go research ffmpeg. Try getting ffmpeg to work for one file then expand on to the scripting solution.
    – Mark
    Apr 5 '20 at 12:27

Your Answer

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

Browse other questions tagged or ask your own question.