Skip to content

Instantly share code, notes, and snippets.

@jayhill90
Created March 30, 2020 19:56
Show Gist options
  • Save jayhill90/17a9343bfb5e3f725a67fcae3681eece to your computer and use it in GitHub Desktop.
Save jayhill90/17a9343bfb5e3f725a67fcae3681eece to your computer and use it in GitHub Desktop.
Convert a folder of flac files to 320kbps mp3
#!/bin/sh
find . -name "*.flac" -exec ffmpeg -i {} -c:a libmp3lame -b:a 320k -map_metadata 0 -id3v2_version 3 {}.mp3 \;
@jayhill90
Copy link
Author

This leaves the filenames as file.flac.mp3.

Run this one liner to fix that.

for file in *.flac.mp3; do mv "$file" "${file//.flac}"; done;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment