Make sure you have ffmpeg installed: ffmpeg -version
If not install based on instructions for whatever linux distro you are currently using
| Distro | Package Manager | Command | Notes |
| :--- | :--- | :--- | :--- |
| Arch | pacman | sudo pacman -S ffmpeg | Always ensures that the latest version is installed |
| Ubuntu/Debian Based | apt | sudo apt update && sudo apt install ffmpeg | Standard for most debian based systems |
| Alpine | apk | apk add ffmpeg | Essential for minimal docker transcodes etc. |
| Fedora | dnf | sudo dnf install ffmpeg-free | Fedora uses a propriotary version of ffmpeg if you dont include the -free |
cd into whatever directory you are changing the files in
Use this command to convert to whatever format usually .flac and then delete the original files because space saving
for f in *.m4a; do ffmpeg -i "$f" -c:a flac "${f%.m4a}.flac" && rm "$f"; donefor f in *.m4a; creates a loop that looks for files with the .m4a extension${f%.m4a}.flac this bit takes the current file name takes the .m4a off and places the .flac on (after conversion of course)&& rm "$f" removes the original files designated by the "$f"