Last active
December 10, 2022 20:03
-
-
Save chrisvoo/b741f7b11d63c2aae3baa10f032938fd to your computer and use it in GitHub Desktop.
Converts a FLAC file to MP3 with ffmpeg and lame encoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to_mp3() { | |
filename=$(basename "$1") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
ffmpeg -i "$1" -codec:a libmp3lame -b:a 320k -map_metadata 0 -id3v2_version 3 ${filename}.mp3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pass the full (or relative) path of your FLAC file to the function. The result will be an MP3 named ad your FLAC original file