Ok, I fixed my question. I asked here because I saw questions like this on StackOverflow (e.g. this or this), and assumed it could be interesting to share my knowledge. Also, I see that there is a ffmpeg tag, so why don't share my solution here? ffmpeg is used in a lot of application by a lot a lot of developers.
– Vito GentileSep 30 '14 at 9:33

2

The ffmpeg tag says, "Questions about interactive use of the FFmpeg command line tool should be asked on Super User.". It's not a big deal, but I just wanted to point it out since there are too many off-topic questions here in my opinion.
– lloganSep 30 '14 at 17:09

Does it divide flac if there are several parts?
– ArtyomDec 4 '17 at 16:29

@Artyom You should probably have the cue file along with your flac where the split points are marked. If so then you can use shnsplit (console) or flacon (GUI) to split your file and convert the parts to mp3. If you only have a single flac you can either write a cui for it or use ffmpeg's -ss and -t options to cut each song out.
– Herman YanushFeb 26 '18 at 13:30

If you want use this option in ffmpeg, you should use the -q:a 0 alias.

Control quality with -qscale:a (or the alias -q:a). Values are encoder specific, so for libmp3lame the range is 0-9 where a lower value is a higher quality. 0-3 will normally produce transparent results, 4 (default) should be close to perceptual transparency, and 6 produces an "acceptable" quality. The option -qscale:a is mapped to the -V option in the standalone lame command-line interface tool.

It will create a folder named "mp3" inside the one with flac files and, inside the mp3 folder, it will save relative mp3 files with a bitrate of 320kbps, without keeping the old file extension in the name.

I know that this was not asked, but considering that one of the reasons that this is done (at least that's what I wanted to do) is so that the music can be imported into Apple iTunes which doesn't support FLAC. In such case it makes more sense to convert FLAC to Apple's own lossless format, m4a. I used this command to convert all the files in the current folder, while retaining similar file sizes.

@MonsterMMORPG you probably missed typing the . after the find command. The . tells find to look in the current folder, and -name tells it to look for matching file names.
– Dhiraj GuptaNov 26 '18 at 5:24

This flac2mp3.sh script uses ffmpeg to convert a folder tree of FLAC files into another folder tree of MP3 files. Cover art is included, when present. You can set a CORES variable to create background jobs to convert several files at a time.

Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).