How to enable replay gain in Airtime 2.1.3
  • I just finished using mp3diags to fix problems in the MPEG headers of some mp3 files in my library.  In the process I used the normalize feature which is based on mp3gain to compute re-play gain for all my songs (yes, this took quite a while).  How do I enable replay gain in Airtime 2.1.3 or is it automatic?  I couldn't find any mention of replay gain in the Airtime 2.1.3 documentation.  I found an article in the FAQ which has a modification to ls_script.liq to enable replay gain.  I looked at the file and it appears the suggested modification is for a previous version (at least I could not find the same "s" declaration line mentioned in the FAQ).  Here is an excerpt from the FAQ:


    enable_replaygain_metadata ()


    s = amplify(1.,override="replay_gain",s)






    these 2 lines I've added right after the first declaration of 's' in ls_script.liq
    (it's exactly right after s = fallback(track_sensitive=false, [queue, default]))




  • 2 Comments sorted by
  • I wouldn't modify the scripts with the code you've posted. What that does is autocompute the ReplayGain right before the track is going to play, and induces a delay until this value is computed.

    Airtime 2.2 will feature full + proper support for ReplayGain.

    "In the process I used the normalize feature which is based on mp3gain to compute re-play gain for all my songs (yes, this took quite a while). "

    Depending on how mp3 gain was called, your files may already normalized and not require any post-processing by Liquidsoap to enable this normalization:

           mp3gain optionally writes gain adjustments directly into the encoded data. In this case, the adjustment works with all mp3 players, i.e. no support for a special tag
           is required.  This mode is activated by any of the options -r, -a, -g, or -l.

    Airtime Pro Hosting: http://airtime.pro
  • Thank you - I checked the settings in mp3diags and it calls " mp3gain -a -k -p -t " so I should be in good shape.  I didn't want to modify any code as that makes upgrading problematic.  Looking forward to Airtime 2.2