pierrefa...@laposte.net wrote:
Convert all tour files can be quite long. Maybe a solution sould exist for converting cevral files in the same command but I don't know how. FFMpeg tutorials could tell you to do it.

I doubt ffmpeg would cover that, as that's a job for another program.

  find FOLDER -type f -iname '*.m4a' -execdir ffmpeg -i "{}" "{}.flac" \;

This should work recursively, work with filenames that have spaces in their pathnames, and leave you with copies of both M4A and FLAC files next to each other. So be sure to run this only if you have plenty of free space.

You can delete the M4A files later (in a second find command) or as you go (with "-delete" as an additional find argument). Shell for loops won't do all these things, and they run the risk of filling the shell input limit.

You can rename the flac files from .m4a.flac to .flac with

find FOLDER -iname '*.m4a.flac' -execdir rename 's/\.m4a\.flac$/.flac/i' "{}"

Replace FOLDER in either command with the path to the toplevel folder containing the M4A files.

If you want to do more than one ffmpeg transcode at once, check out GNU find's (-P option) or check out GNU parallel.

Reply via email to