rip cd audio to disc
cdparanoia -B
with -B option cdparanoia will split the output into multiple files at track boundaries.
next, you can compress wav file to mp3 using lame
lame -h -V 4 track01.cdda.wav track01.mp3
where:
-h Use some quality improvements. Encoding will be slower, but the result will be of higher quality.
-V Enable VBR (Variable BitRate) and specifies the value of VBR quality.