⬆️ ⬇️

Convert FLAC to MP3

You always want to listen to music in good quality. But unfortunately, many devices do not support lossless formats. I had a problem converting flac format to mp3 format for car and player.

FLAC (English Free Lossless Audio Codec) is a popular free codec designed to compress lossless audio data.



Unlike audio codecs that provide lossy compression (MP3, AAC, WMA, Ogg Vorbis) FLAC, like any other lossless codec, does not remove any information from the audio stream and is suitable for listening to music on high-quality repro equipment, and for archiving audio collections. [ FLAC on Wikipedia ]


The solution is searched and I will describe for ubuntu. On the Internet you can find many scripts for this, but many have flaws such as problems with working with tags. Then I will describe a simple solution for converting flac files with a cue file to mp3 tracks. To do this, use flac, lame, cue2tracks.



Installation



Install flac


sudo apt-get install flac 


Install lame


 sudo apt-get install lame 


Install cue2tracks


cue2tracks is a tool for splitting disk rip files using information from a cue file. Project page.

Download ( https://code.google.com/p/cue2tracks/downloads/list ) and install the package.



Transformation



It's simple:

 cue2tracks -c mp3 -Q 0 -B 320 -MC -o " %N - %t " -R file.cue 


')

Launch parameters


-c mp3 - install the codec to mp3, you can also use other codecs (wav, flac, flake, ape, wv, shn, ofr, m4a, ogg).

-Q 0 - set the maximum quality.

-B 320 set the bitrate to 320

-MC set a constant bit rate

-o "% N -% t" - template for the name of the output files, this number in order - the name of the song (05 - Someone Like You .mp3)

-R start the work

file.cue - cue file



Output File Naming Scheme


% A - album name

% P - album artist

% D - album release date

% G - album genre

% a - disk number

% t - track name

% p - track performer

% g - track genre

% n - track number

% N - track number with 0 first



Work with Russian tags


 cue2tracks -c mp3 -Q 0 -B 320 -MC -f WINDOWS-1251 -o " %N - %t " -R file.cue 


Documentation


See https://code.google.com/p/cue2tracks/w/list



findings



In this simplest way, you can convert flac files into separate mp3 files with the preservation of tags and quality.

Source: https://habr.com/ru/post/185530/



All Articles