I decided to write this little primer because I became interested in FLAC, and wanted to encode files directly from CDex. I searched for similar posts, but only found info regarding FLAC and EAC. The command line for both is very similar, but some of the placeholders change a bit. Here are the steps:
1. Go to Options | Settings | Generic and set the ID3 Tag Version to None. This will prevent files named "name.flac.flac" from being created alongside the expected .flac file.
2. In Options | Settings | Encoder select External Encoder. Select "flac.exe" in the Encoder Path box. Check all three checkboxes at the bottom (Hide..., On-the-fly..., WAV header...).
3. Use this Parameter String:-6 -o %2 -T "artist=%a" -T "title=%t" -T "album=%b" -T "date=%y" -T "tracknumber=%tn" -T "genre=%g" -
4. That's It!
Option -6 is being used because it gives me the best speed for the size. Here are the results of an informal test (Clapton - Layla):
1 - 1:10 - 48,921,005 bytes
6 - 1:15 - 46,856,722 bytes
8 - 4:17 - 46,801,659 bytes
So from 6 to 8, it takes 4 times as much, to save 50kBytes. No, thanks. And I guess the speed is limited by my reader (Yamaha SCSI CD-R).
I wish --replay-gain would work for files coming in from STDIN if they are written to a file. I mean, if -o is specified, then enable replay-gain. If you really want it, you can uncheck the "On-the-fly" option, and replace the "-" at the end of the string with a %1. That will calculate track gain. I don't see a way to calculate album gain, since CDex will be encoding one file at a time.
Well, there you go! Hope it helps someone!