вторник, 22 сентября 2015 г.

Уровень громкости в аудиофайлах

Ранее использовал для выравнивания громкости mp3gain, но он был выпилен из Ubuntu 15.04 (а может и ранее, не помню). Вместо него появился replaygain в пакете python-rgain. Название у mp3gain было легко запоминающееся,соответственно имя замены его никак не могу запомнить (см. название блога :) ), вот и пишу это здесь.

replaygain *.mp3 - нормализует уровень по каждому треку и по альбому (содержимому каталога) в целом

p.s. Похоже, побочным действием этой шняги является сброс кодировки в тэгах, после чего они отображаются знаками вопроса. Лечил как обычно -  EasyTAG.

p.p.s. Внезапно обнаружил, что в Ubuntu  17.04 положили вместо всего этого софтину с ещё более незапоминающимся названием - bs1770gain :)


$ replaygain -h
Usage: replaygain [options] AUDIO_FILE [AUDIO_FILE ...]

Apply or display Replay Gain information for audio files. This program is
similar to the likes of 'vorbisgain' or 'mp3gain': You pass in some files,
they are analyzed and receive their share of Replay Gain. The difference is that 'replaygain' supports several file formats, namely Ogg Vorbis (anything you'd put into an Ogg container, actually), Flac, WavPack and MP3. Also, it allows you to view existing Replay Gain information in any of those file types.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -f, --force           Recalculate Replay Gain even if the file already
                        contains gain information.
  -d, --dry-run         Don't actually modify any files.
  -r REF, --reference-loudness=REF
                        Set the reference loudness to REF dB (default: 89 dB)
  --mp3-format=MP3_FORMAT
                        Choose the Replay Gain data format for MP3 files. The
                        default setting should be compatible with most decent
                        software music players, so it is generally not
                        necessary to mess with this setting. Check the README
                        or man page for more information.
  --help-gst            Show GStreamer options.
  --no-album            Don't write any album gain information.
  --show                Don't calculate anything, simply show Replay Gain
                        information for the specified files. In this mode, all
                        other options save for '--mp3-format' are ignored, for
                        they would make no sense.