On the user interface it is possible to specify an offset value ('ReplayGain Calibration') defaulting to -18. However, after running the loudness scanner it does seem hold on the Reference Loudness (default -23 LUFS), regardless of the calibration value (default -18 LUFS). If I compare a loudness scan on the same file with Foobar2000 (v1.2.9), which uses -18 by default I get a different value.
RG and EBU R128/ITU BS.1770 use completely unrelated metrics and postulate some default or reference loudness w.r.t. there their algorithms, i.e. 89 dB and -23 LUFS, respectively. To my understanding these absolute values don't have any meaning on their own and there is no means to relate them to each other from a theoretical point of view.
However, you may apply the algorithms to some audio and may compare the resulting absolute loudness with the respective reference loudness and those getting the gain you have to apply in order to attenuate the audio's loudness to the reference level. And, of course, you can compare the gain calculated from RG with it's counterpart calculated by EBU R128/ITU BS.1770.
If you do this kind of comparison with a larger set of audio files you'll soon discover that the difference between the two gains is not a constant, i.e. it is varying. That's no surprise because the two gains are based on completely different algorithms. However, you can do some statistics in order to figure out the mean difference between the two gains for a given set of audio files (regression).
Those kinds of statistics came to the impression that 89 dB in RG world is (in mean) equivalent to -18 LUFS in EBU R128/ITU BS.1770 world (for details cf. the respective discussion up this thread).
As far as I can see, you're looking for ITU BS1770 algorithm with metrics taken from RG world. That's what is called RG2 in "r128gain".
(1) I'm confused because I can modify both Reference Level AND Calibration value for both options "EBU R128" and "Replaygain"
I would have assumed that the replaygain value is calculated as RG = (Reference Value) - (Loudness), with Loudness measured according ITU-1770-2. For EBU-R128 compliance, the reference value is -23 LUFS to offset content for normalized loudness. For use with music files on portable devices, the recommended reference value is -18 dB for normalized loudness (Wolters et al. (2010), page 11). Can you help me out?
Assuming you're looking for RG2 the command would be (if you are using the GUI just choose the respective radio button from the "Compliant" group):
$ r128gain --rg2 --overwrite input/Track01.flac -o output
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
[1/1] "Track01.flac": 96.2 dBFS (-7.2 dB)
peak: 0.2 dBFS, range: 3.9 dB
[ALBUM]: 96.2 dBFS (-7.2 dB)
peak: 0.2 dBFS, range: 3.9 dB
writing ...
[1/1] "Track01.flac" ... done.
done.
Please note that the result is slightly different to the one from classical RG:
$ r128gain --rg --overwrite input/Track01.flac -o output
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
ReplayGain sucessfully loaded.
analyzing ...
[1/1] "Track01.flac": 96.9 dBFS (-7.9 dB)
[ALBUM]: 96.9 dBFS (-7.9 dB)
writing ...
[1/1] "Track01.flac" ... done.
done.
(2) How could I afterward inspect the meta-date of a file to see which calibration value was used?
$ r128gain-tools/ffmpeg -i output/Track01.flac
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 14 2013 13:18:11 with gcc 4.7.3 (rubenvb-4.7.4-release)
libavutil 52. 39.100 / 52. 39.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 80.101 / 3. 80.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, flac, from 'Track01.flac':
Metadata:
REPLAYGAIN_ALGORITHM: EBU R128
REPLAYGAIN_REFERENCE_LOUDNESS: 89.00 dBFS
REPLAYGAIN_TRACK_GAIN: -7.25 dB
REPLAYGAIN_TRACK_PEAK: 1.023053
REPLAYGAIN_TRACK_RANGE: 3.94 dB
REPLAYGAIN_ALBUM_GAIN: -7.25 dB
REPLAYGAIN_ALBUM_PEAK: 1.023053
REPLAYGAIN_ALBUM_RANGE: 3.94 dB
ENCODER : Lavf55.12.102
Duration: 00:05:44.49, bitrate: 838 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
At least one output file must be specified