Giter Club home page Giter Club logo

r128gain's Introduction

r128gain

Fast audio loudness scanner & tagger


This project is no longer maintained.

When I first wrote it, there was simply no solution to analyze audio loudness and tag files accordingly on Linux from the ReplayGain v2 or Opus R128 conventions.

Now there are several better maintained alternatives, and I recommend using rsgain instead.


PyPI version AUR version Tests status Coverage Supported Python versions License

r128gain is a multi platform command line tool to scan your audio files and tag them with loudness metadata (ReplayGain v2 or Opus R128 gain format), to allow playback of several tracks or albums at a similar loudness level. r128gain can also be used as a Python module from other Python projects to scan and/or tag audio files.

This is beta software, please test and report bugs.

Features

  • Supports all common audio file formats (MP3, AAC, Vorbis, Opus, FLAC, WavPack...) and tag formats (ID3, Vorbis comments, MP4, APEv2...)
  • Writes tags compatible with music players reading track/album gain metadata
  • Supports new R128_XXX_GAIN tag format for Opus files (very few scanners write this tag, although it is defined in the Opus standard)
  • Supports writing gain to the Opus output gain header (experimental)
  • Uses threading to optimally use processor cores resulting in very fast processing

Installation

r128gain requires Python >= 3.6 and FFmpeg >= 2.8.

Standalone Windows executable

Windows users can download a standalone binary which does not require Python, and bundles FFmpeg.

Arch Linux

Arch Linux users can install the r128gain AUR package.

From PyPI (with PIP)

Install r128gain using pip: pip3 install r128gain

From source

  1. If you don't already have it, install setuptools for Python 3
  2. Clone this repository: git clone https://github.com/desbma/r128gain
  3. Install r128gain: python3 setup.py install

Command line usage

Run r128gain -h to get full command line reference.

Examples

  • Scan a single file and display its loudness information: r128gain -d an_audio_file.mp3
  • Scan & tag a single file: r128gain an_audio_file.mp3
  • Scan & tag all audio files in music_directory and all its subdirectories: r128gain -r music_directory
  • Scan & tag all audio files in music_directory and all its subdirectories, and add album gain tags (files contained in each directory are considered as part of the same album): r128gain -r -a music_directory

License

LGPLv2

r128gain's People

Contributors

desbma avatar gavtroy avatar m-reiter avatar wonder93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r128gain's Issues

Option to remove lowercased similar tags

Hi.

Thanks a lot for a very nice tool!! Took me quite a while to find one that supported as many formats as this - good job!

Now I've used it on quite some files, and some of them have incorrect tags in lowercase like:

replaygain track gain           : -7.00 dB
replaygain track peak           : 0.811597
replaygain originator code      : 011011000000

It would be nice to have an option of removing those to ensure players don't accidentally use the wrong one (and it feels cleaner).

Is that something you'd consider implementing?

Add REPLAYGAIN_REFERENCE_LOUDNESS tag

Could I persuade you to add a "REPLAYGAIN_REFERENCE_LOUDNESS" tag like "metaflac --add-replay-gain" does?

This might come in handy for mixed environments that support it (like mine, having old media tagged using "REPLAYGAIN_REFERENCE_LOUDNESS=89 dB" and newer media using a -23 LUFS target, like "REPLAYGAIN_REFERENCE_LOUDNESS=-23 LUFS").

Commandline arg to switch between "RGv2", "ebur128" and "atsc" modes?

For mixed environments (like mine, old media being "replaygained" with v1 algorithm at 89 dB target, and newer media using the EBU R128/BS.1770 standard with -23 LUFS target and gating), it might just be great if we had a means of easily switching the intended target loudness, mode, and units.

For compatibility with older ReplayGain, r128gain could/should be as ist is—following the EBU R128 recommendation but with a differnt target of -18 LUFS (specified in old "dB" tag values).

Then again, some of us already produce/tag for more modern standards like:

EBU R128/BS.1770-2/-3/-4:
Target -23 LUFS, with gating, "LU"/"LUFS" units

"Varied" EBU R128, i.e. different target loudness, for example:
Target -18 LUFS, with gating, "LU"/"LUFS" units (instead of "dB")

ATSC A/85:
Target -24 LUFS, no gating, "LU"/"LUFS" units

There are actually programs that can handle stuff like that, like IDJC, Audacious, my soon-to-be-released version 0.4.5 of ices. IDJC even allows to set a different pregain for files tagged using "LU/LUFS" units.

So it’s be just great if we could specify on the commandline:
– the desired target loudness (like -16/-18/-23/-24 LUFS)
– and/or a mode like ebur128, rgv2, atsc (does ffmpeg handle "gating/no gating" or ATSC A/85?)
– the desired units for the tags (LU/LUFS vs. dB)

If all this sounds too complicated, it might be easier and less error-prone for the majority of users to just select between two "modes", ReplayGainv2 being the default, maybe like this:

r128gain …
—or—
r128gain --mode=rgv2 …
would use a target of -18 LUFS, gating, and "dB" units (as is)

r128gain --mode=ebur128 …
would use a target of -23 LUFS, gating, and "LU"/"LUFS" units (new)

maybe even (if ffmpeg handles that)
r128gain --mode=atsc …
would use a target of -24 LUFS, no gating, and "LU"/"LUFS" units (new but probably not often needed)

For these cases, it might be advisable to also store the REPLAYGAIN_REFERENCE_LOUDNESS tag (see my other issue #13).

Otherwise, thanks for your efforts to bring us a very usable tool!

tta (TrueAudio) files support

diff --git a/r128gain/__init__.py b/r128gain/__init__.py
index 9bd0a7e..5399e06 100755
--- a/r128gain/__init__.py
+++ b/r128gain/__init__.py
@@ -28,7 +28,7 @@ import r128gain.tqdm_logging as tqdm_logging
 import r128gain.opusgain as opusgain
 
 
-AUDIO_EXTENSIONS = frozenset(("flac", "ogg", "opus", "m4a", "mp3", "mpc", "wv"))
+AUDIO_EXTENSIONS = frozenset(("flac", "ogg", "opus", "m4a", "mp3", "mpc", "tta", "wv"))
 RG2_REF_R128_LOUDNESS_DBFS = -18
 OPUS_REF_R128_LOUDNESS_DBFS = -23
 ALBUM_GAIN_KEY = 0

Tagging fails: ValueError: math domain error

Hey,
I have another corrupt file and maybe we can catch the exception it throws:
https://nextcloud.project-insanity.org/s/XaexSNjZZkHjANT

r128gain -c1 -s 04-There\'s\ No\ Other\ Way.mp3 
Analyzing loudness of file '04-There's No Other Way.mp3'...
Traceback (most recent call last):
  File "/usr/bin/r128gain", line 11, in <module>
    load_entry_point('r128gain==0.8.1', 'console_scripts', 'r128gain')()
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 640, in cl_main
    report=logging.getLogger().isEnabledFor(logging.INFO) or args.dry_run)
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 421, in process
    r128_data)
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 391, in show_scan_report
    peak = "%.1f dBFS" % (scale_to_gain(peak))
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 248, in scale_to_gain
    return 20 * math.log10(scale)
ValueError: math domain error

Unfortunately the tagging of the album fails with this one corrupt file.

Best regards,
Jonas

"NameError: name 'exit' is not defined" on large album [136 tracks]

Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
  File "C:\Python36\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
  File "r128gain\__main__.py", line 8, in <module>
  File "Z:\data\Projets\r128gain\r128gain\__init__.py", line 920, in cl_main
NameError: name 'exit' is not defined

Python 3.8, r128gain 1.0.4 installed via Scoop

existing tags not found

As a first test I checked if a tagged file was properly detected. It was not and ended up with these tags:

% metaflac --export-tags-to=- *1* | grep REPLAY
REPLAYGAIN_ALGORITHM=BS.1770
REPLAYGAIN_REFERENCE_LOUDNESS=-23.0 LUFS
REPLAYGAIN_ALBUM_GAIN=-14.2 LU
REPLAYGAIN_TRACK_GAIN=-9.80 dB
REPLAYGAIN_TRACK_PEAK=0.99835200
REPLAYGAIN_ALGORITHM=BS.1770
REPLAYGAIN_REFERENCE_LOUDNESS=-23.0 LUFS
REPLAYGAIN_ALBUM_GAIN=-14.2 LU
REPLAYGAIN_TRACK_GAIN=-9.00 dB
REPLAYGAIN_TRACK_PEAK=0.99765000
REPLAYGAIN_ALGORITHM=BS.1770
REPLAYGAIN_REFERENCE_LOUDNESS=-23.0 LUFS
REPLAYGAIN_ALBUM_GAIN=-14.2 LU
REPLAYGAIN_TRACK_GAIN=-5.00 dB
REPLAYGAIN_TRACK_PEAK=0.99475100

After removing all tags with metaflac --remove-tag='REPLAYGAIN_ALBUM_GAIN' --remove-tag='REPLAYGAIN_TRACK_PEAK' --remove-tag='REPLAYGAIN_ALGORITHM' --remove-tag='REPLAYGAIN_TRACK_GAIN' --remove-tag='REPLAYGAIN_REFERENCE_LOUDNESS' *flac
and tagging again I got

metaflac --export-tags-to=- *2* |grep REPLAY
REPLAYGAIN_TRACK_GAIN=-10.50 dB
REPLAYGAIN_TRACK_PEAK=0.99630700
REPLAYGAIN_ALBUM_GAIN=-9.20 dB
REPLAYGAIN_ALBUM_PEAK=0.99996900

Looks like the existing tag detection is not entirely perfect.

"Failed to analyze files" for opus format in 0.8.0+

It appears something in r128gain's opus handling has broken between release 0.7.1 and the latest. For example the command r128gain -r -a -o . previously ran without error on a directory of .opus files (freshly written by ffmpeg+libopus) in 0.7.1, but on a fresh install I see the following:

$ ~/.local/bin/r128gain -r -a -o .
Analyzing loudness of files './10 - Vision Incision.opus', './02 - Kool Roc Bass.opus', './04 - Blisters on My Brain.opus', './08 - Lazer Sheep Dip Funk.opus', './11 - Nightime Story.opus', './06 - I Used to Fall in Love.opus', './07 - Battle Flag (feat. Pigeonhed).opus', './09 - Will I Get Out of Jail?.opus', './05 - How to Operate With a Blown Mind.opus', './01 - Warming Up the Brain Farm.opus', './03 - Kasparov's Revenge.opus'...
Analyzing loudness of file './10 - Vision Incision.opus'...
Analyzing loudness of file './02 - Kool Roc Bass.opus'...
Analyzing loudness of file './04 - Blisters on My Brain.opus'...
Analyzing loudness of file './08 - Lazer Sheep Dip Funk.opus'...
Analyzing loudness of file './11 - Nightime Story.opus'...
Analyzing loudness of file './06 - I Used to Fall in Love.opus'...
Analyzing loudness of file './07 - Battle Flag (feat. Pigeonhed).opus'...
Analyzing loudness of file './09 - Will I Get Out of Jail?.opus'...
Analyzing loudness of file './05 - How to Operate With a Blown Mind.opus'...
Analyzing loudness of file './01 - Warming Up the Brain Farm.opus'...
Analyzing loudness of file './03 - Kasparov's Revenge.opus'...
Failed to analyze files './10 - Vision Incision.opus', './02 - Kool Roc Bass.opus', './04 - Blisters on My Brain.opus', './08 - Lazer Sheep Dip Funk.opus', './11 - Nightime Story.opus', './06 - I Used to Fall in Love.opus', './07 - Battle Flag (feat. Pigeonhed).opus', './09 - Will I Get Out of Jail?.opus', './05 - How to Operate With a Blown Mind.opus', './01 - Warming Up the Brain Farm.opus', './03 - Kasparov's Revenge.opus': CalledProcessError Command '['/usr/bin/ffmpeg', '-hide_banner', '-nostats', '-threads:0', '1', '-i', './10 - Vision Incision.opus', '-threads:1', '1', '-i', './02 - Kool Roc Bass.opus', '-threads:2', '1', '-i', './04 - Blisters on My Brain.opus', '-threads:3', '1', '-i', './08 - Lazer Sheep Dip Funk.opus', '-threads:4', '1', '-i', './11 - Nightime Story.opus', '-threads:5', '1', '-i', './06 - I Used to Fall in Love.opus', '-threads:6', '1', '-i', './07 - Battle Flag (feat. Pigeonhed).opus', '-threads:7', '1', '-i', './09 - Will I Get Out of Jail?.opus', '-threads:8', '1', '-i', './05 - How to Operate With a Blown Mind.opus', '-threads:9', '1', '-i', './01 - Warming Up the Brain Farm.opus', '-threads:10', '1', '-i', "./03 - Kasparov's Revenge.opus", '-filter_threads', '1', '-map', 'a', '-filter_complex', '[0:a]anul[a_r128_in_0]; [a_r128_in_0]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_0]; [1:a]anul[a_r128_in_1]; [a_r128_in_1]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_1]; [2:a]anul[a_r128_in_2]; [a_r128_in_2]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_2]; [3:a]anul[a_r128_in_3]; [a_r128_in_3]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_3]; [4:a]anul[a_r128_in_4]; [a_r128_in_4]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_4]; [5:a]anul[a_r128_in_5]; [a_r128_in_5]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_5]; [6:a]anul[a_r128_in_6]; [a_r128_in_6]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_6]; [7:a]anul[a_r128_in_7]; [a_r128_in_7]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_7]; [8:a]anul[a_r128_in_8]; [a_r128_in_8]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_8]; [9:a]anul[a_r128_in_9]; [a_r128_in_9]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_9]; [10:a]anul[a_r128_in_10]; [a_r128_in_10]aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo,afifo[a_r128_in_fmt_10]; [a_r128_in_fmt_0][a_r128_in_fmt_1][a_r128_in_fmt_2][a_r128_in_fmt_3][a_r128_in_fmt_4][a_r128_in_fmt_5][a_r128_in_fmt_6][a_r128_in_fmt_7][a_r128_in_fmt_8][a_r128_in_fmt_9][a_r128_in_fmt_10]concat=n=11:v=0:a=1[a_r128_in_concat]; [a_r128_in_concat]ebur128=framelog=verbose', '-f', 'null', '/dev/null']' returned non-zero exit status 1.
File './10 - Vision Incision.opus': loudness = -23.0 LUFS, sample peak = -
File './02 - Kool Roc Bass.opus': loudness = -23.0 LUFS, sample peak = -
File './04 - Blisters on My Brain.opus': loudness = -23.0 LUFS, sample peak = -
File './08 - Lazer Sheep Dip Funk.opus': loudness = -23.0 LUFS, sample peak = -
File './11 - Nightime Story.opus': loudness = -23.0 LUFS, sample peak = -
File './06 - I Used to Fall in Love.opus': loudness = -23.0 LUFS, sample peak = -
File './07 - Battle Flag (feat. Pigeonhed).opus': loudness = -23.0 LUFS, sample peak = -
File './09 - Will I Get Out of Jail?.opus': loudness = -23.0 LUFS, sample peak = -
File './05 - How to Operate With a Blown Mind.opus': loudness = -23.0 LUFS, sample peak = -
File './01 - Warming Up the Brain Farm.opus': loudness = -23.0 LUFS, sample peak = -
File './03 - Kasparov's Revenge.opus': loudness = -23.0 LUFS, sample peak = -
Album '.': loudness = SKIPPED, sample peak = SKIPPED
Tagging file './10 - Vision Incision.opus'
Tagging file './02 - Kool Roc Bass.opus'
Tagging file './04 - Blisters on My Brain.opus'
Tagging file './08 - Lazer Sheep Dip Funk.opus'
Tagging file './11 - Nightime Story.opus'
Tagging file './06 - I Used to Fall in Love.opus'
Tagging file './07 - Battle Flag (feat. Pigeonhed).opus'
Tagging file './09 - Will I Get Out of Jail?.opus'
Tagging file './05 - How to Operate With a Blown Mind.opus'
Tagging file './01 - Warming Up the Brain Farm.opus'
Tagging file './03 - Kasparov's Revenge.opus'

Pinning my local install to r128gain==0.7.1 is a workaround.

New release?

The last release (1.0.6) was over a year ago and there have been quite a few changes since then. Perhaps it would be a good time to create a new release?

Getting error: HeaderNotFoundError, can't sync to MPEG frame

Hey thanks for the program,
I'm getting following error while trying to resume tagging on my library:

r128gain -s -r music
[...]
Traceback (most recent call last):
  File "/usr/bin/r128gain", line 11, in <module>
   load_entry_point('r128gain==0.8.0', 'console_scripts', 'r128gain')()                                                                                                                                   
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 617, in cl_main                                                                                                                       
    report=logging.getLogger().isEnabledFor(logging.INFO) or args.dry_run)                                                                                                                                 
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 458, in process_recursive                                                                                                             
    executor=executor)                                                                                                                                                                                     
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 187, in scan                                                                                                                          
    if skip_tagged and has_loudness_tag(audio_filepath)[0]:                                                                                                                                                
  File "/usr/lib/python3.7/site-packages/r128gain/__init__.py", line 337, in has_loudness_tag                                                                                                              
    mf = mutagen.File(filepath)                                                                                                                                                                            
  File "/usr/lib/python3.7/site-packages/mutagen/_util.py", line 148, in wrapper_func                                                                                                                      
    return func(h, *args, **kwargs)                                                                                                                                                                        
  File "/usr/lib/python3.7/site-packages/mutagen/_file.py", line 298, in File                                                                                                                              
    return Kind(fileobj, filename=filething.filename)                                                                                                                                                      
  File "/usr/lib/python3.7/site-packages/mutagen/_file.py", line 49, in __init__                                                                                                                           
    self.load(*args, **kwargs)                                                                                                                                                                             
  File "/usr/lib/python3.7/site-packages/mutagen/_util.py", line 140, in wrapper                                                                                                                           
    return func(self, h, *args, **kwargs)                                                                                                                                                                  
  File "/usr/lib/python3.7/site-packages/mutagen/id3/_file.py", line 423, in load                                                                                                                          
    self.info = self._Info(fileobj, offset)                                                                                                                                                                
  File "/usr/lib/python3.7/site-packages/mutagen/_util.py", line 169, in wrapper                                                                                                                           
    return func(*args, **kwargs)                                                                                                                                                                           
  File "/usr/lib/python3.7/site-packages/mutagen/mp3/__init__.py", line 403, in __init__                                                                                                                   
    raise HeaderNotFoundError("can't sync to MPEG frame")                                                                                                                                                  
mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame

Best regards,
Jonas

High memory usage when running r128gain against mp3 album

I've been on the fence about reporting this one as the answer might be "quit trying to run r128gain on a Raspberry Pi". But since the behaviour varies by the content being analyzed I'll go ahead and report it.

This is for the following setup:

  • A recent build of ffmpeg's master branch with --enable-libopus
  • r128gain 0.9.3
  • Raspberry Pi 3 (4 cores, 747MB usable RAM)
  • Copies of the Smashing Pumpkins fine "Mellon Collie & the Infinite Sadness" double album, 28 tracks freshly encoded to opus/mp3 with ffmpeg
  • USB-attached external disk for media storage & swap space

opus files

I run r128gain -r -a -o --ffmpeg-path=/usr/local/bin/ffmpeg --dry-run smash_opus. Memory usage is very low. Analysis takes about 12 minutes and r128gain completes successfully.

mp3 files

I run r128gain -r -a -o --ffmpeg-path=/usr/local/bin/ffmpeg --dry-run smash_mp3. Then memory usage gets too high and it grinds to a halt, eventually failing with an error.

Some things I have tried:

  • Limiting r128gain to a single thread - still crashes, just takes longer
  • Giving the system a lot of swap space - I've seen memory usage as high as 3GB before ffmpeg is oomkilled
  • Using an old (2017) build of ffmpeg I had lying around - analysis of individual files ("Analyzing loudness of file...") completes fine but r128gain breaks at the next stage with errors like Failed to analyze file 'smash_mp3/210 - We Only Come Out at Night.flac.mp3': CalledProcessError Command '['/usr/bin/ffmpeg', '-hide_banner', '-nostats', '-threads:0', '1', '-i', 'smash_mp3/210 - We Only Come Out at Night.flac.mp3', '-filter_threads', '1', '-map', 'a', '-filter:a', 'aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose', '-f', 'null', '/dev/null']' returned non-zero exit status 1, one per input file. Memory usage remains low and it fails immediately so this is probably an unrelated issue.
  • Using the OS (Debian GNU/Linux 9.8)'s default ffmpeg - as above

Here's some detailed output:

$ /usr/local/bin/ffmpeg -version
ffmpeg version N-93757-ge94447cd49 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --disable-ffplay --disable-ffprobe --disable-debug --arch=armhf --enable-omx --enable-omx-rpi --enable-nonfree --enable-gpl --enable-decoder=flac --enable-decoder=libopus --enable-demuxer=flac --enable-demuxer=ogg --enable-muxer=opus --enable-muxer=mp3 --enable-encoder=libmp3lame --enable-encoder=libopus --enable-libmp3lame --enable-libopus
libavutil      56. 26.100 / 56. 26.100
libavcodec     58. 52.100 / 58. 52.100
libavformat    58. 27.103 / 58. 27.103
libavdevice    58.  7.100 / 58.  7.100
libavfilter     7. 50.100 /  7. 50.100
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100
$ /usr/local/bin/ffmpeg -filters
ffmpeg version N-93757-ge94447cd49 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --disable-ffplay --disable-ffprobe --disable-debug --arch=armhf --enable-omx --enable-omx-rpi --enable-nonfree --enable-gpl --enable-decoder=flac --enable-decoder=libopus --enable-demuxer=flac --enable-demuxer=ogg --enable-muxer=opus --enable-muxer=mp3 --enable-encoder=libmp3lame --enable-encoder=libopus --enable-libmp3lame --enable-libopus
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 52.100 / 58. 52.100
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 50.100 /  7. 50.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Filters:
  T.. = Timeline support
  .S. = Slice threading
  ..C = Command support
  A = Audio input/output
  V = Video input/output
  N = Dynamic number and/or type of input/output
  | = Source or sink filter
 ... abench            A->A       Benchmark part of a filtergraph.
 ... acompressor       A->A       Audio compressor.
 ... acontrast         A->A       Simple audio dynamic range compression/expansion filter.
 ... acopy             A->A       Copy the input audio unchanged to the output.
 ... acue              A->A       Delay filtering to match a cue.
 ... acrossfade        AA->A      Cross fade two input audio streams.
 ... acrossover        A->N       Split audio into per-bands streams.
 ... acrusher          A->A       Reduce audio bit resolution.
 .S. adeclick          A->A       Remove impulsive noise from input audio.
 .S. adeclip           A->A       Remove clipping from input audio.
 T.. adelay            A->A       Delay one or more audio channels.
 ... aderivative       A->A       Compute derivative of input audio.
 ... aecho             A->A       Add echoing to the audio.
 ... aemphasis         A->A       Audio emphasis.
 ... aeval             A->A       Filter audio signal according to a specified expression.
 T.. afade             A->A       Fade in/out input audio.
 TSC afftdn            A->A       Denoise audio samples using FFT.
 ... afftfilt          A->A       Apply arbitrary expressions to samples in frequency domain.
 .S. afir              AA->N      Apply Finite Impulse Response filter with supplied coefficients in 2nd stream.
 ... aformat           A->A       Convert the input audio to one of the specified formats.
 ... agate             A->A       Audio gate.
 .S. aiir              A->N       Apply Infinite Impulse Response filter with supplied coefficients.
 ... aintegral         A->A       Compute integral of input audio.
 ... ainterleave       N->A       Temporally interleave audio inputs.
 ... alimiter          A->A       Audio lookahead limiter.
 TSC allpass           A->A       Apply a two-pole all-pass filter.
 ... aloop             A->A       Loop audio samples.
 ... amerge            N->A       Merge two or more audio streams into a single multi-channel stream.
 T.. ametadata         A->A       Manipulate audio frame metadata.
 ... amix              N->A       Audio mixing.
 ... amultiply         AA->A      Multiply two audio streams.
 ..C anequalizer       A->N       Apply high-order audio parametric multi band equalizer.
 TS. anlmdn            A->A       Reduce broadband noise from stream using Non-Local Means.
 ... anull             A->A       Pass the source unchanged to the output.
 T.. apad              A->A       Pad audio with silence.
 ... aperms            A->A       Set permissions for the output audio frame.
 ... aphaser           A->A       Add a phasing effect to the audio.
 ... apulsator         A->A       Audio pulsator.
 ... arealtime         A->A       Slow down filtering to match realtime.
 ... aresample         A->A       Resample audio data.
 ... areverse          A->A       Reverse an audio clip.
 ... aselect           A->N       Select audio frames to pass in output.
 ... asendcmd          A->A       Send commands to filters.
 ... asetnsamples      A->A       Set the number of samples for each output audio frames.
 ... asetpts           A->A       Set PTS for the output audio frame.
 ... asetrate          A->A       Change the sample rate without altering the data.
 ... asettb            A->A       Set timebase for the audio output link.
 ... ashowinfo         A->A       Show textual information for each audio frame.
 T.. asidedata         A->A       Manipulate audio frame side data.
 T.. asoftclip         A->A       Audio Soft Clipper.
 ... asplit            A->N       Pass on the audio input to N audio outputs.
 ... astats            A->A       Show time domain statistics about audio frames.
 ..C astreamselect     N->N       Select audio streams
 ..C atempo            A->A       Adjust audio tempo.
 ... atrim             A->A       Pick one continuous section from the input, drop the rest.
 TSC bandpass          A->A       Apply a two-pole Butterworth band-pass filter.
 TSC bandreject        A->A       Apply a two-pole Butterworth band-reject filter.
 TSC bass              A->A       Boost or cut lower frequencies.
 TSC biquad            A->A       Apply a biquad IIR filter with the given coefficients.
 ... channelmap        A->A       Remap audio channels.
 ... channelsplit      A->N       Split audio into per-channel streams.
 ... chorus            A->A       Add a chorus effect to the audio.
 ... compand           A->A       Compress or expand audio dynamic range.
 ... compensationdelay A->A       Audio Compensation Delay Line.
 T.. crossfeed         A->A       Apply headphone crossfeed filter.
 ... crystalizer       A->A       Simple expand audio dynamic range filter.
 T.. dcshift           A->A       Apply a DC shift to the audio.
 ... drmeter           A->A       Measure audio dynamic range.
 T.. dynaudnorm        A->A       Dynamic Audio Normalizer.
 ... earwax            A->A       Widen the stereo image.
 ... ebur128           A->N       EBU R128 scanner.
 TSC equalizer         A->A       Apply two-pole peaking equalization (EQ) filter.
 T.. extrastereo       A->A       Increase difference between stereo audio channels.
 ..C firequalizer      A->A       Finite Impulse Response Equalizer.
 ... flanger           A->A       Apply a flanging effect to the audio.
 ... haas              A->A       Apply Haas Stereo Enhancer.
 ... hdcd              A->A       Apply High Definition Compatible Digital (HDCD) decoding.
 .S. headphone         N->A       Apply headphone binaural spatialization with HRTFs in additional streams.
 TSC highpass          A->A       Apply a high-pass filter with 3dB point frequency.
 TSC highshelf         A->A       Apply a high shelf filter.
 ... join              N->A       Join multiple audio streams into multi-channel output.
 ... loudnorm          A->A       EBU R128 loudness normalization
 TSC lowpass           A->A       Apply a low-pass filter with 3dB point frequency.
 TSC lowshelf          A->A       Apply a low shelf filter.
 ... mcompand          A->A       Multiband Compress or expand audio dynamic range.
 ... pan               A->A       Remix channels with coefficients (panning).
 ... replaygain        A->A       ReplayGain scanner.
 ... sidechaincompress AA->A      Sidechain compressor.
 ... sidechaingate     AA->A      Audio sidechain gate.
 ... silencedetect     A->A       Detect silence.
 ... silenceremove     A->A       Remove silence.
 ... stereotools       A->A       Apply various stereo tools.
 T.. stereowiden       A->A       Apply stereo widening effect.
 ... superequalizer    A->A       Apply 18 band equalization filter.
 .S. surround          A->A       Apply audio surround upmix filter.
 TSC treble            A->A       Boost or cut upper frequencies.
 ... tremolo           A->A       Apply tremolo effect.
 ... vibrato           A->A       Apply vibrato effect.
 T.C volume            A->A       Change input volume.
 ... volumedetect      A->A       Detect audio volume.
 ... aevalsrc          |->A       Generate an audio signal generated by an expression.
 ... anoisesrc         |->A       Generate a noise audio signal.
 ... anullsrc          |->A       Null audio source, return empty audio frames.
 ... hilbert           |->A       Generate a Hilbert transform FIR coefficients.
 ... sinc              |->A       Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.
 ... sine              |->A       Generate sine wave audio signal.
 ... anullsink         A->|       Do absolutely nothing with the input audio.
 ... alphaextract      V->N       Extract an alpha channel as a grayscale image component.
 ... alphamerge        VV->V      Copy the luma value of the second input into the alpha channel of the first input.
 .S. amplify           V->V       Amplify changes between successive video frames.
 TS. atadenoise        V->V       Apply an Adaptive Temporal Averaging Denoiser.
 TS. avgblur           V->V       Apply Average Blur filter.
 T.. bbox              V->V       Compute bounding box for each frame.
 ... bench             V->V       Benchmark part of a filtergraph.
 T.. bitplanenoise     V->V       Measure bit plane noise.
 ... blackdetect       V->V       Detect video intervals that are (almost) black.
 ... blackframe        V->V       Detect frames that are (almost) black.
 TS. blend             VV->V      Blend two video frames into each other.
 TS. bm3d              N->V       Block-Matching 3D denoiser.
 T.. boxblur           V->V       Blur the input.
 TS. bwdif             V->V       Deinterlace the input image.
 TS. chromahold        V->V       Turns a certain color range into gray.
 TS. chromakey         V->V       Turns a certain color into transparency. Operates on YUV colors.
 TS. chromashift       V->V       Shift chroma.
 ... ciescope          V->V       Video CIE scope.
 T.. codecview         V->V       Visualize information about some codecs.
 TS. colorbalance      V->V       Adjust the color balance.
 TS. colorchannelmixer V->V       Adjust colors by mixing color channels.
 TS. colorkey          V->V       Turns a certain color into transparency. Operates on RGB colors.
 T.. colorlevels       V->V       Adjust the color levels.
 TS. colormatrix       V->V       Convert color matrix.
 TS. colorspace        V->V       Convert between colorspaces.
 TS. convolution       V->V       Apply convolution filter.
 TS. convolve          VV->V      Convolve first video stream with second video stream.
 ... copy              V->V       Copy the input video unchanged to the output.
 ... cover_rect        V->V       Find and cover a user specified object.
 ..C crop              V->V       Crop the input video.
 T.. cropdetect        V->V       Auto-detect crop size.
 ... cue               V->V       Delay filtering to match a cue.
 TS. curves            V->V       Adjust components curves.
 .S. datascope         V->V       Video data analysis.
 TS. dctdnoiz          V->V       Denoise frames using 2D DCT.
 TS. deband            V->V       Debands video.
 T.. deblock           V->V       Deblock video.
 ... decimate          N->V       Decimate frames (post field matching filter).
 TS. deconvolve        VV->V      Deconvolve first video stream with second video stream.
 TS. dedot             V->V       Reduce cross-luminance and cross-color.
 TS. deflate           V->V       Apply deflate effect.
 ... deflicker         V->V       Remove temporal frame luminance variations.
 ... dejudder          V->V       Remove judder produced by pullup.
 T.. delogo            V->V       Remove logo from input video.
 ... deshake           V->V       Stabilize shaky video.
 TS. despill           V->V       Despill video.
 ... detelecine        V->V       Apply an inverse telecine pattern.
 TS. dilation          V->V       Apply dilation effect.
 T.. displace          VVV->V     Displace pixels.
 ... doubleweave       V->V       Weave input video fields into double number of frames.
 T.. drawbox           V->V       Draw a colored box on the input video.
 ... drawgraph         V->V       Draw a graph using input video metadata.
 T.. drawgrid          V->V       Draw a colored grid on the input video.
 T.. edgedetect        V->V       Detect and draw edge.
 ... elbg              V->V       Apply posterize effect, using the ELBG algorithm.
 T.. entropy           V->V       Measure video frames entropy.
 T.C eq                V->V       Adjust brightness, contrast, gamma, and saturation.
 TS. erosion           V->V       Apply erosion effect.
 ... extractplanes     V->N       Extract planes as grayscale frames.
 .S. fade              V->V       Fade in/out input video.
 T.. fftdnoiz          V->V       Denoise frames using 3D FFT.
 T.. fftfilt           V->V       Apply arbitrary expressions to pixels in frequency domain.
 ... field             V->V       Extract a field from the input video.
 ... fieldhint         V->V       Field matching using hints.
 ... fieldmatch        N->V       Field matching for inverse telecine.
 T.. fieldorder        V->V       Set the field order.
 T.. fillborders       V->V       Fill borders of the input video.
 ... find_rect         V->V       Find a user specified object.
 T.. floodfill         V->V       Fill area with same color with another color.
 ... format            V->V       Convert the input video to one of the specified pixel formats.
 ... fps               V->V       Force constant framerate.
 ... framepack         VV->V      Generate a frame packed stereoscopic video.
 .S. framerate         V->V       Upsamples or downsamples progressive source between specified frame rates.
 T.. framestep         V->V       Select one frame every N frames.
 ... freezedetect      V->V       Detects frozen video input.
 T.. fspp              V->V       Apply Fast Simple Post-processing filter.
 TS. gblur             V->V       Apply Gaussian Blur filter.
 TS. geq               V->V       Apply generic equation to each pixel.
 T.. gradfun           V->V       Debands video quickly using gradients.
 ... graphmonitor      V->V       Show various filtergraph stats.
 TS. greyedge          V->V       Estimates scene illumination by grey edge assumption.
 TS. haldclut          VV->V      Adjust colors using a Hald CLUT.
 TS. hflip             V->V       Horizontally flip the input video.
 T.. histeq            V->V       Apply global color histogram equalization.
 ... histogram         V->V       Compute and draw a histogram.
 T.. hqdn3d            V->V       Apply a High Quality 3D Denoiser.
 .S. hqx               V->V       Scale the input by 2, 3 or 4 using the hq*x magnification algorithm.
 ... hstack            N->V       Stack video inputs horizontally.
 T.C hue               V->V       Adjust the hue and saturation of the input video.
 ... hwdownload        V->V       Download a hardware frame to a normal frame
 ... hwmap             V->V       Map hardware frames
 ... hwupload          V->V       Upload a normal frame to a hardware frame
 T.. hysteresis        VV->V      Grow first stream into second stream by connecting components.
 ... idet              V->V       Interlace detect Filter.
 T.. il                V->V       Deinterleave or interleave fields.
 TS. inflate           V->V       Apply inflate effect.
 ... interlace         V->V       Convert progressive video into interlaced.
 ... interleave        N->V       Temporally interleave video inputs.
 ... kerndeint         V->V       Apply kernel deinterlacing to the input.
 .S. lagfun            V->V       Slowly update darker pixels.
 .S. lenscorrection    V->V       Rectify the image by correcting for lens distortion.
 TS. limiter           V->V       Limit pixels components to the specified range.
 ... loop              V->V       Loop video frames.
 TS. lumakey           V->V       Turns a certain luma into transparency.
 T.. lut               V->V       Compute and apply a lookup table to the RGB/YUV input video.
 TS. lut1d             V->V       Adjust colors using a 1D LUT.
 T.. lut2              VV->V      Compute and apply a lookup table from two video inputs.
 TS. lut3d             V->V       Adjust colors using a 3D LUT.
 T.. lutrgb            V->V       Compute and apply a lookup table to the RGB input video.
 T.. lutyuv            V->V       Compute and apply a lookup table to the YUV input video.
 TS. maskedclamp       VVV->V     Clamp first stream with second stream and third stream.
 TS. maskedmerge       VVV->V     Merge first stream with second stream using third stream as mask.
 TS. maskfun           V->V       Create Mask.
 ... mcdeint           V->V       Apply motion compensating deinterlacing.
 ... mergeplanes       N->V       Merge planes.
 ... mestimate         V->V       Generate motion vectors.
 T.. metadata          V->V       Manipulate video frame metadata.
 T.. midequalizer      VV->V      Apply Midway Equalization.
 ... minterpolate      V->V       Frame rate conversion using Motion Interpolation.
 .S. mix               N->V       Mix video inputs.
 ... mpdecimate        V->V       Remove near-duplicate frames.
 T.. negate            V->V       Negate input video.
 TS. nlmeans           V->V       Non-local means denoiser.
 T.. nnedi             V->V       Apply neural network edge directed interpolation intra-only deinterlacer.
 ... noformat          V->V       Force libavfilter not to use any of the specified pixel formats for the input to the next filter.
 TS. noise             V->V       Add noise.
 T.. normalize         V->V       Normalize RGB video.
 ... null              V->V       Pass the source unchanged to the output.
 T.. oscilloscope      V->V       2D Video Oscilloscope.
 TSC overlay           VV->V      Overlay a video source on top of the input.
 T.. owdenoise         V->V       Denoise using wavelets.
 ... pad               V->V       Pad the input video.
 ... palettegen        V->V       Find the optimal palette for a given stream.
 ... paletteuse        VV->V      Use a palette to downsample an input video stream.
 ... perms             V->V       Set permissions for the output video frame.
 TS. perspective       V->V       Correct the perspective of video.
 T.. phase             V->V       Phase shift fields.
 ... pixdesctest       V->V       Test pixel format definitions.
 T.. pixscope          V->V       Pixel data analysis.
 T.C pp                V->V       Filter video using libpostproc.
 T.. pp7               V->V       Apply Postprocessing 7 filter.
 TS. premultiply       N->V       PreMultiply first stream with first plane of second stream.
 TS. prewitt           V->V       Apply prewitt operator.
 T.. pseudocolor       V->V       Make pseudocolored video frames.
 ... psnr              VV->V      Calculate the PSNR between two video streams.
 ... pullup            V->V       Pullup from field sequence to frames.
 T.. qp                V->V       Change video quantization parameters.
 ... random            V->V       Return random frames.
 T.. readeia608        V->V       Read EIA-608 Closed Caption codes from input video and write them to frame metadata.
 ... readvitc          V->V       Read vertical interval timecode and write it to frame metadata.
 ... realtime          V->V       Slow down filtering to match realtime.
 TS. remap             VVV->V     Remap pixels.
 TS. removegrain       V->V       Remove grain.
 T.. removelogo        V->V       Remove a TV logo based on a mask image.
 ... repeatfields      V->V       Hard repeat fields based on MPEG repeat field flag.
 ... reverse           V->V       Reverse a clip.
 TS. rgbashift         V->V       Shift RGBA.
 TS. roberts           V->V       Apply roberts cross operator.
 TSC rotate            V->V       Rotate the input image.
 T.. sab               V->V       Apply shape adaptive blur.
 ..C scale             V->V       Scale the input video size and/or convert the image format.
 ..C scale2ref         VV->VV     Scale the input video size and/or convert the image format to the given reference.
 ... select            V->N       Select video frames to pass in output.
 TS. selectivecolor    V->V       Apply CMYK adjustments to specific color ranges.
 ... sendcmd           V->V       Send commands to filters.
 ... separatefields    V->V       Split input video frames into fields.
 ... setdar            V->V       Set the frame display aspect ratio.
 ... setfield          V->V       Force field for the output video frame.
 ... setparams         V->V       Force field, or color property for the output video frame.
 ... setpts            V->V       Set PTS for the output video frame.
 ... setrange          V->V       Force color range for the output video frame.
 ... setsar            V->V       Set the pixel sample aspect ratio.
 ... settb             V->V       Set timebase for the video output link.
 ... showinfo          V->V       Show textual information for each video frame.
 T.. showpalette       V->V       Display frame palette.
 T.. shuffleframes     V->V       Shuffle video frames.
 T.. shuffleplanes     V->V       Shuffle video planes.
 T.. sidedata          V->V       Manipulate video frame side data.
 .S. signalstats       V->V       Generate statistics from video analysis.
 ... signature         N->V       Calculate the MPEG-7 video signature
 T.. smartblur         V->V       Blur the input video without impacting the outlines.
 TS. sobel             V->V       Apply sobel operator.
 ... split             V->N       Pass on the input to N video outputs.
 T.C spp               V->V       Apply a simple post processing filter.
 TS. sr                V->V       Apply DNN-based image super resolution to the input.
 ... ssim              VV->V      Calculate the SSIM between two video streams.
 .S. stereo3d          V->V       Convert video stereoscopic 3D view.
 ..C streamselect      N->N       Select video streams
 ... super2xsai        V->V       Scale the input by 2x using the Super2xSaI pixel art algorithm.
 T.. swaprect          V->V       Swap 2 rectangular objects in video.
 T.. swapuv            V->V       Swap U and V components.
 TS. tblend            V->V       Blend successive frames.
 ... telecine          V->V       Apply a telecine pattern.
 TS. threshold         VVVV->V    Threshold first video stream using other video streams.
 ... thumbnail         V->V       Select the most representative frame in a given sequence of consecutive frames.
 ... tile              V->V       Tile several successive frames together.
 ... tinterlace        V->V       Perform temporal field interlacing.
 T.. tlut2             V->V       Compute and apply a lookup table from two successive frames.
 TS. tmix              V->V       Mix successive video frames.
 .S. tonemap           V->V       Conversion to/from different dynamic ranges.
 ... tpad              V->V       Temporarily pad video frames.
 .S. transpose         V->V       Transpose input video.
 ... trim              V->V       Pick one continuous section from the input, drop the rest.
 TS. unpremultiply     N->V       UnPreMultiply first stream with first plane of second stream.
 T.. unsharp           V->V       Sharpen or blur the input video.
 T.. uspp              V->V       Apply Ultra Simple / Slow Post-processing filter.
 T.. vaguedenoiser     V->V       Apply a Wavelet based Denoiser.
 ... vectorscope       V->V       Video vectorscope.
 T.. vflip             V->V       Flip the input video vertically.
 ... vfrdet            V->V       Variable frame rate detect filter.
 TS. vibrance          V->V       Boost or alter saturation.
 T.. vignette          V->V       Make or reverse a vignette effect.
 ... vmafmotion        V->V       Calculate the VMAF Motion score.
 ... vstack            N->V       Stack video inputs vertically.
 TS. w3fdif            V->V       Apply Martin Weston three field deinterlace.
 .S. waveform          V->V       Video waveform monitor.
 ... weave             V->V       Weave input video fields into frames.
 .S. xbr               V->V       Scale the input using xBR algorithm.
 ... xstack            N->V       Stack video inputs into custom layout.
 TS. yadif             V->V       Deinterlace the input image.
 ... zoompan           V->V       Apply Zoom & Pan effect.
 ... allrgb            |->V       Generate all RGB colors.
 ... allyuv            |->V       Generate all yuv colors.
 ... cellauto          |->V       Create pattern generated by an elementary cellular automaton.
 ..C color             |->V       Provide an uniformly colored input.
 ... haldclutsrc       |->V       Provide an identity Hald CLUT.
 ... life              |->V       Create life.
 ... mandelbrot        |->V       Render a Mandelbrot fractal.
 ... mptestsrc         |->V       Generate various test pattern.
 ... nullsrc           |->V       Null video source, return unprocessed video frames.
 ... pal75bars         |->V       Generate PAL 75% color bars.
 ... pal100bars        |->V       Generate PAL 100% color bars.
 ... rgbtestsrc        |->V       Generate RGB test pattern.
 ... smptebars         |->V       Generate SMPTE color bars.
 ... smptehdbars       |->V       Generate SMPTE HD color bars.
 ... testsrc           |->V       Generate test pattern.
 ... testsrc2          |->V       Generate another test pattern.
 ... yuvtestsrc        |->V       Generate YUV test pattern.
 ... nullsink          V->|       Do absolutely nothing with the input video.
 ... abitscope         A->V       Convert input audio to audio bit scope video output.
 ... adrawgraph        A->V       Draw a graph using input audio metadata.
 ... agraphmonitor     A->V       Show various filtergraph stats.
 ... ahistogram        A->V       Convert input audio to histogram video output.
 ... aphasemeter       A->N       Convert input audio to phase meter video output.
 ... avectorscope      A->V       Convert input audio to vectorscope video output.
 ..C concat            N->N       Concatenate audio and video streams.
 ... showcqt           A->V       Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.
 ... showfreqs         A->V       Convert input audio to a frequencies video output.
 .S. showspectrum      A->V       Convert input audio to a spectrum video output.
 .S. showspectrumpic   A->V       Convert input audio to a spectrum video output single picture.
 ... showvolume        A->V       Convert input audio volume to video output.
 ... showwaves         A->V       Convert input audio to a video output.
 ... showwavespic      A->V       Convert input audio to a video output single picture.
 ... spectrumsynth     VV->A      Convert input spectrum videos to audio output.
 ..C amovie            |->N       Read audio from a movie source.
 ..C movie             |->N       Read from a movie source.
 ... afifo             A->A       Buffer input frames and send them when they are requested.
 ... fifo              V->V       Buffer input images and send them when they are requested.
 ... abuffer           |->A       Buffer audio frames, and make them accessible to the filterchain.
 ... buffer            |->V       Buffer video frames, and make them accessible to the filterchain.
 ... abuffersink       A->|       Buffer audio frames, and make them available to the end of the filter graph.
 ... buffersink        V->|       Buffer video frames, and make them available to the end of the filter graph.

And output with -v debug:

2019-05-16 12:04:22,337 MainThread: Detected FFmpeg lib versions: libavutil: 56.26.100, libavcodec: 58.52.100, libavformat: 58.27.103, libavdevice: 58.7.100, libavfilter: 7.50.100, libswscale: 5.4.100, libswresample: 3.4.100, libpostproc: 55.4.100
2019-05-16 12:04:23,912 Thread-1: Analyzing loudness of files 'smash_mp3/208 - Stumbleine.flac.mp3', 'smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3', 'smash_mp3/107 - To Forgive.flac.mp3', 'smash_mp3/114 - Take Me Down.flac.mp3', 'smash_mp3/204 - In the Arms of Sleep.flac.mp3', 'smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3', 'smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3', 'smash_mp3/201 - Where Boys Fear to Tread.flac.mp3', 'smash_mp3/110 - Cupid De Locke.flac.mp3', 'smash_mp3/105 - Here Is No Why.flac.mp3', 'smash_mp3/108 - An Ode To No One.flac.mp3', 'smash_mp3/102 - Tonight Tonight.flac.mp3', 'smash_mp3/203 - Thirty-Three.flac.mp3', 'smash_mp3/104 - Zero.flac.mp3', 'smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3', 'smash_mp3/212 - Lily (My One and Only).flac.mp3', 'smash_mp3/202 - Bodies.flac.mp3', 'smash_mp3/109 - Love.flac.mp3', 'smash_mp3/206 - Tales of a Scorched Earth.flac.mp3', 'smash_mp3/209 - X.Y.U..flac.mp3', 'smash_mp3/103 - Jellybelly.flac.mp3', 'smash_mp3/213 - By Starlight.flac.mp3', 'smash_mp3/210 - We Only Come Out at Night.flac.mp3', 'smash_mp3/112 - Muzzle.flac.mp3', 'smash_mp3/214 - Farewell and Goodnight.flac.mp3', 'smash_mp3/211 - Beautiful.flac.mp3', 'smash_mp3/205 - 1979.flac.mp3', 'smash_mp3/111 - Galapogos.flac.mp3'...
2019-05-16 12:04:23,915 Thread-2: Analyzing loudness of file 'smash_mp3/208 - Stumbleine.flac.mp3'...
2019-05-16 12:04:23,927 Thread-3: Analyzing loudness of file 'smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3'...
2019-05-16 12:04:23,941 Thread-4: Analyzing loudness of file 'smash_mp3/107 - To Forgive.flac.mp3'...
2019-05-16 12:04:24,009 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/208 - Stumbleine.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:04:24,027 Thread-3: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:04:24,029 Thread-1: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/208 - Stumbleine.flac.mp3" -threads:1 1 -i "smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3" -threads:2 1 -i "smash_mp3/107 - To Forgive.flac.mp3" -threads:3 1 -i "smash_mp3/114 - Take Me Down.flac.mp3" -threads:4 1 -i "smash_mp3/204 - In the Arms of Sleep.flac.mp3" -threads:5 1 -i "smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3" -threads:6 1 -i "smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3" -threads:7 1 -i "smash_mp3/201 - Where Boys Fear to Tread.flac.mp3" -threads:8 1 -i "smash_mp3/110 - Cupid De Locke.flac.mp3" -threads:9 1 -i "smash_mp3/105 - Here Is No Why.flac.mp3" -threads:10 1 -i "smash_mp3/108 - An Ode To No One.flac.mp3" -threads:11 1 -i "smash_mp3/102 - Tonight Tonight.flac.mp3" -threads:12 1 -i "smash_mp3/203 - Thirty-Three.flac.mp3" -threads:13 1 -i "smash_mp3/104 - Zero.flac.mp3" -threads:14 1 -i "smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3" -threads:15 1 -i "smash_mp3/212 - Lily (My One and Only).flac.mp3" -threads:16 1 -i "smash_mp3/202 - Bodies.flac.mp3" -threads:17 1 -i "smash_mp3/109 - Love.flac.mp3" -threads:18 1 -i "smash_mp3/206 - Tales of a Scorched Earth.flac.mp3" -threads:19 1 -i "smash_mp3/209 - X.Y.U..flac.mp3" -threads:20 1 -i "smash_mp3/103 - Jellybelly.flac.mp3" -threads:21 1 -i "smash_mp3/213 - By Starlight.flac.mp3" -threads:22 1 -i "smash_mp3/210 - We Only Come Out at Night.flac.mp3" -threads:23 1 -i "smash_mp3/112 - Muzzle.flac.mp3" -threads:24 1 -i "smash_mp3/214 - Farewell and Goodnight.flac.mp3" -threads:25 1 -i "smash_mp3/211 - Beautiful.flac.mp3" -threads:26 1 -i "smash_mp3/205 - 1979.flac.mp3" -threads:27 1 -i "smash_mp3/111 - Galapogos.flac.mp3" -filter_threads 1 -map a -filter_complex "[0:a]asplit[a_rg_in_0][a_r128_in_0]; [a_rg_in_0]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_0]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_0]; [1:a]asplit[a_rg_in_1][a_r128_in_1]; [a_rg_in_1]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_1]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_1]; [2:a]asplit[a_rg_in_2][a_r128_in_2]; [a_rg_in_2]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_2]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_2]; [3:a]asplit[a_rg_in_3][a_r128_in_3]; [a_rg_in_3]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_3]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_3]; [4:a]asplit[a_rg_in_4][a_r128_in_4]; [a_rg_in_4]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_4]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_4]; [5:a]asplit[a_rg_in_5][a_r128_in_5]; [a_rg_in_5]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_5]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_5]; [6:a]asplit[a_rg_in_6][a_r128_in_6]; [a_rg_in_6]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_6]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_6]; [7:a]asplit[a_rg_in_7][a_r128_in_7]; [a_rg_in_7]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_7]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_7]; [8:a]asplit[a_rg_in_8][a_r128_in_8]; [a_rg_in_8]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_8]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_8]; [9:a]asplit[a_rg_in_9][a_r128_in_9]; [a_rg_in_9]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_9]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_9]; [10:a]asplit[a_rg_in_10][a_r128_in_10]; [a_rg_in_10]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_10]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_10]; [11:a]asplit[a_rg_in_11][a_r128_in_11]; [a_rg_in_11]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_11]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_11]; [12:a]asplit[a_rg_in_12][a_r128_in_12]; [a_rg_in_12]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_12]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_12]; [13:a]asplit[a_rg_in_13][a_r128_in_13]; [a_rg_in_13]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_13]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_13]; [14:a]asplit[a_rg_in_14][a_r128_in_14]; [a_rg_in_14]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_14]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_14]; [15:a]asplit[a_rg_in_15][a_r128_in_15]; [a_rg_in_15]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_15]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_15]; [16:a]asplit[a_rg_in_16][a_r128_in_16]; [a_rg_in_16]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_16]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_16]; [17:a]asplit[a_rg_in_17][a_r128_in_17]; [a_rg_in_17]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_17]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_17]; [18:a]asplit[a_rg_in_18][a_r128_in_18]; [a_rg_in_18]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_18]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_18]; [19:a]asplit[a_rg_in_19][a_r128_in_19]; [a_rg_in_19]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_19]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_19]; [20:a]asplit[a_rg_in_20][a_r128_in_20]; [a_rg_in_20]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_20]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_20]; [21:a]asplit[a_rg_in_21][a_r128_in_21]; [a_rg_in_21]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_21]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_21]; [22:a]asplit[a_rg_in_22][a_r128_in_22]; [a_rg_in_22]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_22]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_22]; [23:a]asplit[a_rg_in_23][a_r128_in_23]; [a_rg_in_23]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_23]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_23]; [24:a]asplit[a_rg_in_24][a_r128_in_24]; [a_rg_in_24]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_24]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_24]; [25:a]asplit[a_rg_in_25][a_r128_in_25]; [a_rg_in_25]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_25]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_25]; [26:a]asplit[a_rg_in_26][a_r128_in_26]; [a_rg_in_26]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_26]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_26]; [27:a]asplit[a_rg_in_27][a_r128_in_27]; [a_rg_in_27]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_27]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_27]; [a_r128_in_fmt_0][a_r128_in_fmt_1][a_r128_in_fmt_2][a_r128_in_fmt_3][a_r128_in_fmt_4][a_r128_in_fmt_5][a_r128_in_fmt_6][a_r128_in_fmt_7][a_r128_in_fmt_8][a_r128_in_fmt_9][a_r128_in_fmt_10][a_r128_in_fmt_11][a_r128_in_fmt_12][a_r128_in_fmt_13][a_r128_in_fmt_14][a_r128_in_fmt_15][a_r128_in_fmt_16][a_r128_in_fmt_17][a_r128_in_fmt_18][a_r128_in_fmt_19][a_r128_in_fmt_20][a_r128_in_fmt_21][a_r128_in_fmt_22][a_r128_in_fmt_23][a_r128_in_fmt_24][a_r128_in_fmt_25][a_r128_in_fmt_26][a_r128_in_fmt_27]concat=n=28:v=0:a=1[a_r128_in_concat]; [a_r128_in_concat]ebur128=framelog=verbose" -f null /dev/null
2019-05-16 12:04:24,033 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/107 - To Forgive.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:04:49,451 Thread-2: Analyzing loudness of file 'smash_mp3/114 - Take Me Down.flac.mp3'...
2019-05-16 12:04:49,457 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/114 - Take Me Down.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:05:03,411 Thread-4: Analyzing loudness of file 'smash_mp3/204 - In the Arms of Sleep.flac.mp3'...
2019-05-16 12:05:03,417 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/204 - In the Arms of Sleep.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:05:14,901 Thread-2: Analyzing loudness of file 'smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3'...
2019-05-16 12:05:14,906 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:05:32,844 Thread-3: Analyzing loudness of file 'smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3'...
2019-05-16 12:05:32,846 Thread-3: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:05:39,728 Thread-4: Analyzing loudness of file 'smash_mp3/201 - Where Boys Fear to Tread.flac.mp3'...
2019-05-16 12:05:39,734 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/201 - Where Boys Fear to Tread.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:05:54,783 Thread-2: Analyzing loudness of file 'smash_mp3/110 - Cupid De Locke.flac.mp3'...
2019-05-16 12:05:54,788 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/110 - Cupid De Locke.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:06:18,180 Thread-4: Analyzing loudness of file 'smash_mp3/105 - Here Is No Why.flac.mp3'...
2019-05-16 12:06:18,184 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/105 - Here Is No Why.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:06:19,703 Thread-2: Analyzing loudness of file 'smash_mp3/108 - An Ode To No One.flac.mp3'...
2019-05-16 12:06:19,707 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/108 - An Ode To No One.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:06:51,542 Thread-4: Analyzing loudness of file 'smash_mp3/102 - Tonight Tonight.flac.mp3'...
2019-05-16 12:06:51,547 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/102 - Tonight Tonight.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:06:56,020 Thread-3: Analyzing loudness of file 'smash_mp3/203 - Thirty-Three.flac.mp3'...
2019-05-16 12:06:56,022 Thread-3: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/203 - Thirty-Three.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:07:05,770 Thread-2: Analyzing loudness of file 'smash_mp3/104 - Zero.flac.mp3'...
2019-05-16 12:07:05,775 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/104 - Zero.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:07:30,657 Thread-4: Analyzing loudness of file 'smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3'...
2019-05-16 12:07:30,662 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:07:31,045 Thread-2: Analyzing loudness of file 'smash_mp3/212 - Lily (My One and Only).flac.mp3'...
2019-05-16 12:07:31,057 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/212 - Lily (My One and Only).flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:07:32,321 Thread-3: Analyzing loudness of file 'smash_mp3/202 - Bodies.flac.mp3'...
2019-05-16 12:07:32,323 Thread-3: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/202 - Bodies.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:07:56,158 Thread-4: Analyzing loudness of file 'smash_mp3/109 - Love.flac.mp3'...
2019-05-16 12:07:56,165 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/109 - Love.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:08:01,567 Thread-2: Analyzing loudness of file 'smash_mp3/206 - Tales of a Scorched Earth.flac.mp3'...
2019-05-16 12:08:01,580 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/206 - Tales of a Scorched Earth.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:08:10,621 Thread-3: Analyzing loudness of file 'smash_mp3/209 - X.Y.U..flac.mp3'...
2019-05-16 12:08:10,625 Thread-3: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/209 - X.Y.U..flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:09:18,132 Thread-4: Analyzing loudness of file 'smash_mp3/103 - Jellybelly.flac.mp3'...
2019-05-16 12:09:18,137 Thread-2: Analyzing loudness of file 'smash_mp3/213 - By Starlight.flac.mp3'...
2019-05-16 12:09:18,363 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/103 - Jellybelly.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 12:09:18,366 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/213 - By Starlight.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:01:20,319 Thread-1: Analyzing loudness of file 'smash_mp3/210 - We Only Come Out at Night.flac.mp3'...
2019-05-16 13:01:20,780 Thread-1: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/210 - We Only Come Out at Night.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:01:54,626 Thread-4: Analyzing loudness of file 'smash_mp3/112 - Muzzle.flac.mp3'...
2019-05-16 13:01:54,631 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/112 - Muzzle.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:02:02,678 Thread-3: Analyzing loudness of file 'smash_mp3/214 - Farewell and Goodnight.flac.mp3'...
2019-05-16 13:02:02,682 Thread-3: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/214 - Farewell and Goodnight.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:02:05,021 Thread-1: Analyzing loudness of file 'smash_mp3/211 - Beautiful.flac.mp3'...
2019-05-16 13:02:05,026 Thread-1: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/211 - Beautiful.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:02:12,022 Thread-2: Analyzing loudness of file 'smash_mp3/205 - 1979.flac.mp3'...
2019-05-16 13:02:12,026 Thread-2: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/205 - 1979.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:02:26,472 Thread-4: Analyzing loudness of file 'smash_mp3/111 - Galapogos.flac.mp3'...
2019-05-16 13:02:26,477 Thread-4: /usr/local/bin/ffmpeg -hide_banner -nostats -threads:0 1 -i "smash_mp3/111 - Galapogos.flac.mp3" -filter_threads 1 -map a -filter:a aformat=sample_fmts=s16,replaygain,ebur128=framelog=verbose -f null /dev/null
2019-05-16 13:03:03,929 MainThread: Failed to analyze files 'smash_mp3/111 - Galapogos.flac.mp3', 'smash_mp3/103 - Jellybelly.flac.mp3', 'smash_mp3/212 - Lily (My One and Only).flac.mp3', 'smash_mp3/105 - Here Is No Why.flac.mp3', 'smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3', 'smash_mp3/202 - Bodies.flac.mp3', 'smash_mp3/112 - Muzzle.flac.mp3', 'smash_mp3/210 - We Only Come Out at Night.flac.mp3', 'smash_mp3/108 - An Ode To No One.flac.mp3', 'smash_mp3/205 - 1979.flac.mp3', 'smash_mp3/204 - In the Arms of Sleep.flac.mp3', 'smash_mp3/109 - Love.flac.mp3', 'smash_mp3/110 - Cupid De Locke.flac.mp3', 'smash_mp3/102 - Tonight Tonight.flac.mp3', 'smash_mp3/213 - By Starlight.flac.mp3', 'smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3', 'smash_mp3/206 - Tales of a Scorched Earth.flac.mp3', 'smash_mp3/214 - Farewell and Goodnight.flac.mp3', 'smash_mp3/203 - Thirty-Three.flac.mp3', 'smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3', 'smash_mp3/209 - X.Y.U..flac.mp3', 'smash_mp3/211 - Beautiful.flac.mp3', 'smash_mp3/104 - Zero.flac.mp3', 'smash_mp3/114 - Take Me Down.flac.mp3', 'smash_mp3/107 - To Forgive.flac.mp3', 'smash_mp3/208 - Stumbleine.flac.mp3', 'smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3', 'smash_mp3/201 - Where Boys Fear to Tread.flac.mp3': CalledProcessError Command '['/usr/local/bin/ffmpeg', '-hide_banner', '-nostats', '-threads:0', '1', '-i', 'smash_mp3/208 - Stumbleine.flac.mp3', '-threads:1', '1', '-i', 'smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3', '-threads:2', '1', '-i', 'smash_mp3/107 - To Forgive.flac.mp3', '-threads:3', '1', '-i', 'smash_mp3/114 - Take Me Down.flac.mp3', '-threads:4', '1', '-i', 'smash_mp3/204 - In the Arms of Sleep.flac.mp3', '-threads:5', '1', '-i', 'smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3', '-threads:6', '1', '-i', 'smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3', '-threads:7', '1', '-i', 'smash_mp3/201 - Where Boys Fear to Tread.flac.mp3', '-threads:8', '1', '-i', 'smash_mp3/110 - Cupid De Locke.flac.mp3', '-threads:9', '1', '-i', 'smash_mp3/105 - Here Is No Why.flac.mp3', '-threads:10', '1', '-i', 'smash_mp3/108 - An Ode To No One.flac.mp3', '-threads:11', '1', '-i', 'smash_mp3/102 - Tonight Tonight.flac.mp3', '-threads:12', '1', '-i', 'smash_mp3/203 - Thirty-Three.flac.mp3', '-threads:13', '1', '-i', 'smash_mp3/104 - Zero.flac.mp3', '-threads:14', '1', '-i', 'smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3', '-threads:15', '1', '-i', 'smash_mp3/212 - Lily (My One and Only).flac.mp3', '-threads:16', '1', '-i', 'smash_mp3/202 - Bodies.flac.mp3', '-threads:17', '1', '-i', 'smash_mp3/109 - Love.flac.mp3', '-threads:18', '1', '-i', 'smash_mp3/206 - Tales of a Scorched Earth.flac.mp3', '-threads:19', '1', '-i', 'smash_mp3/209 - X.Y.U..flac.mp3', '-threads:20', '1', '-i', 'smash_mp3/103 - Jellybelly.flac.mp3', '-threads:21', '1', '-i', 'smash_mp3/213 - By Starlight.flac.mp3', '-threads:22', '1', '-i', 'smash_mp3/210 - We Only Come Out at Night.flac.mp3', '-threads:23', '1', '-i', 'smash_mp3/112 - Muzzle.flac.mp3', '-threads:24', '1', '-i', 'smash_mp3/214 - Farewell and Goodnight.flac.mp3', '-threads:25', '1', '-i', 'smash_mp3/211 - Beautiful.flac.mp3', '-threads:26', '1', '-i', 'smash_mp3/205 - 1979.flac.mp3', '-threads:27', '1', '-i', 'smash_mp3/111 - Galapogos.flac.mp3', '-filter_threads', '1', '-map', 'a', '-filter_complex', '[0:a]asplit[a_rg_in_0][a_r128_in_0]; [a_rg_in_0]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_0]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_0]; [1:a]asplit[a_rg_in_1][a_r128_in_1]; [a_rg_in_1]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_1]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_1]; [2:a]asplit[a_rg_in_2][a_r128_in_2]; [a_rg_in_2]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_2]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_2]; [3:a]asplit[a_rg_in_3][a_r128_in_3]; [a_rg_in_3]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_3]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_3]; [4:a]asplit[a_rg_in_4][a_r128_in_4]; [a_rg_in_4]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_4]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_4]; [5:a]asplit[a_rg_in_5][a_r128_in_5]; [a_rg_in_5]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_5]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_5]; [6:a]asplit[a_rg_in_6][a_r128_in_6]; [a_rg_in_6]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_6]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_6]; [7:a]asplit[a_rg_in_7][a_r128_in_7]; [a_rg_in_7]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_7]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_7]; [8:a]asplit[a_rg_in_8][a_r128_in_8]; [a_rg_in_8]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_8]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_8]; [9:a]asplit[a_rg_in_9][a_r128_in_9]; [a_rg_in_9]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_9]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_9]; [10:a]asplit[a_rg_in_10][a_r128_in_10]; [a_rg_in_10]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_10]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_10]; [11:a]asplit[a_rg_in_11][a_r128_in_11]; [a_rg_in_11]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_11]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_11]; [12:a]asplit[a_rg_in_12][a_r128_in_12]; [a_rg_in_12]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_12]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_12]; [13:a]asplit[a_rg_in_13][a_r128_in_13]; [a_rg_in_13]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_13]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_13]; [14:a]asplit[a_rg_in_14][a_r128_in_14]; [a_rg_in_14]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_14]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_14]; [15:a]asplit[a_rg_in_15][a_r128_in_15]; [a_rg_in_15]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_15]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_15]; [16:a]asplit[a_rg_in_16][a_r128_in_16]; [a_rg_in_16]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_16]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_16]; [17:a]asplit[a_rg_in_17][a_r128_in_17]; [a_rg_in_17]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_17]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_17]; [18:a]asplit[a_rg_in_18][a_r128_in_18]; [a_rg_in_18]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_18]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_18]; [19:a]asplit[a_rg_in_19][a_r128_in_19]; [a_rg_in_19]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_19]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_19]; [20:a]asplit[a_rg_in_20][a_r128_in_20]; [a_rg_in_20]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_20]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_20]; [21:a]asplit[a_rg_in_21][a_r128_in_21]; [a_rg_in_21]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_21]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_21]; [22:a]asplit[a_rg_in_22][a_r128_in_22]; [a_rg_in_22]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_22]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_22]; [23:a]asplit[a_rg_in_23][a_r128_in_23]; [a_rg_in_23]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_23]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_23]; [24:a]asplit[a_rg_in_24][a_r128_in_24]; [a_rg_in_24]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_24]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_24]; [25:a]asplit[a_rg_in_25][a_r128_in_25]; [a_rg_in_25]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_25]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_25]; [26:a]asplit[a_rg_in_26][a_r128_in_26]; [a_rg_in_26]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_26]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_26]; [27:a]asplit[a_rg_in_27][a_r128_in_27]; [a_rg_in_27]aformat=sample_fmts=s16,replaygain,anullsink; [a_r128_in_27]aformat=sample_fmts=s16:channel_layouts=stereo:sample_rates=48000,afifo[a_r128_in_fmt_27]; [a_r128_in_fmt_0][a_r128_in_fmt_1][a_r128_in_fmt_2][a_r128_in_fmt_3][a_r128_in_fmt_4][a_r128_in_fmt_5][a_r128_in_fmt_6][a_r128_in_fmt_7][a_r128_in_fmt_8][a_r128_in_fmt_9][a_r128_in_fmt_10][a_r128_in_fmt_11][a_r128_in_fmt_12][a_r128_in_fmt_13][a_r128_in_fmt_14][a_r128_in_fmt_15][a_r128_in_fmt_16][a_r128_in_fmt_17][a_r128_in_fmt_18][a_r128_in_fmt_19][a_r128_in_fmt_20][a_r128_in_fmt_21][a_r128_in_fmt_22][a_r128_in_fmt_23][a_r128_in_fmt_24][a_r128_in_fmt_25][a_r128_in_fmt_26][a_r128_in_fmt_27]concat=n=28:v=0:a=1[a_r128_in_concat]; [a_r128_in_concat]ebur128=framelog=verbose', '-f', 'null', '/dev/null']' returned non-zero exit status -9
2019-05-16 13:03:03,932 MainThread: File 'smash_mp3/111 - Galapogos.flac.mp3': loudness = -14.5 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,932 MainThread: File 'smash_mp3/103 - Jellybelly.flac.mp3': loudness = -10.3 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,933 MainThread: File 'smash_mp3/212 - Lily (My One and Only).flac.mp3': loudness = -16.0 LUFS, sample peak = -2.4 dBFS
2019-05-16 13:03:03,934 MainThread: File 'smash_mp3/105 - Here Is No Why.flac.mp3': loudness = -10.4 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,934 MainThread: File 'smash_mp3/207 - Thru the Eyes of Ruby.flac.mp3': loudness = -11.9 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,935 MainThread: File 'smash_mp3/202 - Bodies.flac.mp3': loudness = -9.6 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,936 MainThread: File 'smash_mp3/112 - Muzzle.flac.mp3': loudness = -11.3 LUFS, sample peak = -0.0 dBFS
2019-05-16 13:03:03,937 MainThread: File 'smash_mp3/210 - We Only Come Out at Night.flac.mp3': loudness = -14.9 LUFS, sample peak = -1.2 dBFS
2019-05-16 13:03:03,938 MainThread: File 'smash_mp3/108 - An Ode To No One.flac.mp3': loudness = -11.4 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,939 MainThread: File 'smash_mp3/205 - 1979.flac.mp3': loudness = -11.9 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,940 MainThread: File 'smash_mp3/204 - In the Arms of Sleep.flac.mp3': loudness = -15.4 LUFS, sample peak = -2.3 dBFS
2019-05-16 13:03:03,941 MainThread: File 'smash_mp3/109 - Love.flac.mp3': loudness = -11.3 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,941 MainThread: File 'smash_mp3/110 - Cupid De Locke.flac.mp3': loudness = -11.8 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,942 MainThread: File 'smash_mp3/102 - Tonight Tonight.flac.mp3': loudness = -12.0 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,943 MainThread: File 'smash_mp3/213 - By Starlight.flac.mp3': loudness = -12.7 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,944 MainThread: File 'smash_mp3/106 - Bullet With Butterfly Wings.flac.mp3': loudness = -11.4 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,945 MainThread: File 'smash_mp3/206 - Tales of a Scorched Earth.flac.mp3': loudness = -10.4 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,946 MainThread: File 'smash_mp3/214 - Farewell and Goodnight.flac.mp3': loudness = -15.1 LUFS, sample peak = -0.3 dBFS
2019-05-16 13:03:03,947 MainThread: File 'smash_mp3/203 - Thirty-Three.flac.mp3': loudness = -14.9 LUFS, sample peak = -1.8 dBFS
2019-05-16 13:03:03,948 MainThread: File 'smash_mp3/113 - Porcelina Of The Vast Oceans.flac.mp3': loudness = -11.9 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,949 MainThread: File 'smash_mp3/209 - X.Y.U..flac.mp3': loudness = -11.0 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,950 MainThread: File 'smash_mp3/211 - Beautiful.flac.mp3': loudness = -12.9 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,951 MainThread: File 'smash_mp3/104 - Zero.flac.mp3': loudness = -9.9 LUFS, sample peak = -0.3 dBFS
2019-05-16 13:03:03,952 MainThread: File 'smash_mp3/114 - Take Me Down.flac.mp3': loudness = -15.7 LUFS, sample peak = -0.6 dBFS
2019-05-16 13:03:03,953 MainThread: File 'smash_mp3/107 - To Forgive.flac.mp3': loudness = -13.8 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,953 MainThread: File 'smash_mp3/208 - Stumbleine.flac.mp3': loudness = -20.2 LUFS, sample peak = -3.0 dBFS
2019-05-16 13:03:03,954 MainThread: File 'smash_mp3/101 - Mellon Collie And The Infinite Sadness.flac.mp3': loudness = -23.1 LUFS, sample peak = -5.6 dBFS
2019-05-16 13:03:03,955 MainThread: File 'smash_mp3/201 - Where Boys Fear to Tread.flac.mp3': loudness = -11.2 LUFS, sample peak = 0.0 dBFS
2019-05-16 13:03:03,956 MainThread: Album 'smash_mp3': loudness = SKIPPED, sample peak = SKIPPED

Peak tag doesn't conform to RG or ITU standards

First, thanks for this awesome tool.

I was surprised to see r128gain's peak tags show values higher than I expected, with some above 1.0 for lossless files, which seemed impossible. After doing some reading, I understand that this is the "true peak," or an estimation of where the peak would be after digital to analog conversion.

But in the ReplayGain 2.0 spec, peak amplitude reflects sample peak:

For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.

The ITU BS.1770-4 spec does advocate using true peak, but in decibels:

Meters that follow these guidelines, and that use an oversampled sampling rate of at least 192 kHz, should indicate the result in the units of dB TP, having converted the result to a logarithmic scale. This can be achieved by calculating “20log[10]” of the attenuated, oversampled, filtered, absolute value, then adding 12.04dB. The “dB TP” Designation signifies decibels relative to 100% full scale, true-peak measurement.

So instead of replaygain_album_peak=1.25892541, we would expect something like replaygain_album_peak=2.0 dB TP.

To be honest, the more I think about this, the more your behavior seems like the best combination of backwards compatibility and usefulness, but it does seem surprising and technically violate RGv2. Have you considered raising this with the people drafting the RGv2 spec and documenting the divergence in the meantime?

Thanks again for the software.

Incorrect loudness with true peak above 0dBTP

I was testing r128gain with I Won the Loudness War by Dan Worrall, which has an integrated loudness of +2.3 LUFS. However, it is calculated as +1.9 LUFS when using r128gain.

I believe this is because r128gain tells ffmpeg to resample to 48kHz signed 16 bit stereo. The original audio is 44.1kHz and clips during resampling, reducing the maximum loudness.

This could be solved by removing the resample, though I am unsure what other effects that would have. Alternatively, the intermediate format could be switched to float. I have been able to get correct results with both methods.

aac louder mp3

I play the files with mpd and the tagged aac files are louder than the tagged mp3 files

Discrepancy between different tools

While I was looking for a suitable tool for Linux, I made a small comparison with 4 flac/opus files. This resulted in some very different values, which I would like to share here. Could it be that I've overlooked something?

image host

image host

Argument list too long

When I execute processing with such code:

source = glob.glob(f"{source}/*.mp3")
r128gain.process(source, album_gain=True, skip_tagged=True)

I have this error:

r128gain:Failed to analyze files 'song1.mp3','song2.mp3',...,'song6000.mp3': OSError [Errno 7] Argument list too long: 'ffmpeg'

I execute this command on directory that contains about 6000 mp3 tracks.

opus: sample peak only diplays a minus sign

When tagging an opus audo file( ogg container) the sample peak only shows a minus. The tag is fine however.

[mrgeorgen@mrgPC ~/Downloads]$ r128gain The_Weeknd-Save_Your_Tears.opus 
Analyzing loudness of file 'The_Weeknd-Save_Your_Tears.opus'... 
File 'The_Weeknd-Save_Your_Tears.opus': loudness = -7.9 LUFS, sample peak = - 
Tagging file 'The_Weeknd-Save_Your_Tears.opus' 

I can upload the file, if you like

Opus: please support setting the header's output gain from album gain

The experimental option --opus-output-gain currently assigns track gain to the header output gain. However, album gain is usually a better normalization mode. For this reason, Opus developers used to recommend setting the header output gain to album gain. As a note, for this reason, foobar2000 sets it to album gain by default, and so does opusenc when converting REPLAYGAIN tags from FLAC.

Therefore, I would like to kindly request an option to set the header output gain to album gain instead of track gain, and perhaps even ask you to consider making this the default behavior.

A few enhancements?

r128gain has been very useful in analysing and adding r128 loudness tags to my music, however, there are a few additional capabilities I think would be useful for consideration:

  • add album dynamic range score calculated using R128
  • add option to output summarised data per folder only: Album loudness, peak, dynamic range
  • add ability to format data in CSV or other delimited format readily capable of import into a table

Clarification: order of scanned tracks in album dir non-deterministic?

Hello, I was wondering if the scan order of track files made a difference when calculating album gain? I noticed that when I ran r128gain --recursive --album-gain album_dir/ a couple of times, the scanning order of the track files changed between runs in a non-deterministic fashion, but the resulting album gain appeared to remain the same.

Support for Opus format

I have here a ogg/oga file using following codec (according to VLC):

Opus Audio / Stereo / 48000 Hz / 32 bits (per Sample)

When I try to tag this file by using r128gain it starts and then immediately exists silently - there is no error, no warning or any other message/hint printed.

Can you please add or fix support for the opus format?

Different loudness for OPUS and MP3 files encoded from the same FLAC file.

Hello. First of all thanks for making this software. I use it a lot and love it. :)

I am not sure if this is worth reporting but thought I'd ask anyway. This is the first time I have noticed something like this.

I am using this small script:

#!/usr/bin/env sh

ffmpeg -i ./electric_feel.flac -b:a 320k ./electric_feel.opus
ffmpeg -i ./electric_feel.flac -b:a 0 ./electric_feel.mp3
r128gain ./electric_feel.opus ./electric_feel.mp3

The resultant files are recognised to have different loudnesses.

Analyzing loudness of file './electric_feel.opus'...
Analyzing loudness of file './electric_feel.mp3'...
File './electric_feel.opus': loudness = -7.4 LUFS, sample peak = -
File './electric_feel.mp3': loudness = -7.8 LUFS, sample peak = 0.0 dBFS
Tagging file './electric_feel.opus'
Tagging file './electric_feel.mp3'

I think the difference is miniscule but on mpd I have set the preamp for replaygain tagged files to +8 because of which the OPUS file has noticeable distortion but the MP3 file seems fine.

I can provide electric_feel.flac if needed. Please feel free to close if this is a non-issue.

Thanks again.

Add an option to preserve file timestamps

Since some tools determine the time a file was added from the file timestamps it would be nice to have an option to preserve those.

If you're willing to implement this, I could give it a go and send you a pull request.

ReplayGain values too high for surround audio, often causing clipping

I noticed that r128gain does calculate ReplayGain for 5.1 and 7.1 surround files, but in my tests the gain values applied to 5.1 surround files were always over 7 dB higher than the file that was downmixed to stereo before running r128gain on it, which was normally high enough to cause clipping on multiple channels when applied.
I don't know how the gain values are currently calculated for surround audio, but I think a simple solution would be to just downmix the stream with ffmpeg -ac 2 for the gain calculations, and do the peak calculations separately without downmixing.

Different values to previous version?

Hi>
I have two or three questions.

I used r128gain-win32 to generate ReplayGain tags on an MP3 file already tagged in Winamp (5.8) to test what would happen.

I'll copy the extended tags here, some old, some newly generated:

REPLAYGAIN_ALBUM_GAIN -5.41 dB
REPLAYGAIN_ALBUM_PEAK 1.014365435
REPLAYGAIN_TRACK_GAIN -4.40 dB
REPLAYGAIN_TRACK_GAIN -5.26 dB
REPLAYGAIN_TRACK_PEAK 0.996887
REPLAYGAIN_TRACK_PEAK 0.996883988

Track gain -4.40 dB and track peak 0.996887 were added by r128gain.

I can remove tags on all MP3s -- I have many -- and it takes about 2 seconds, so that is not an issue. I'm wondering though, why does r128gain calculate a different gain and peak value?

Winamp: -5.26;
r128gain: -4.40
-- a pretty big difference.

I assume it has to do with ReplayGain version 2 versus version 1 that I believe Winamp still uses. Maybe I'm wrong. Winamp's documentation makes no mention of ReplayGain versions.

My second question>

According to the ReplayGain documentation, gain is applied by players that support ReplayGain by multiplying each sample value by a constant. The formula "ten raised to the power of one-twentieth of replay gain". For -5.26 dB, 0.54575786109127092251134492267094. For -4.4 dB, 0.60255958607435774697130296573509. I'm interested in the formula. (I sometimes I want to normalize WAV files that were encoded to MP3.) Does the r128gain-calculated track gain follow the same formula "ten raised to the power of one-twentieth of replay gain", applying it to every sample in a track to attenuate or increase replay gain?

Last but not least>

Can you outline why ReplayGain version 2 is better than version 1?

I look forward to a reply. I hope your reply can be soon, because I'm postponing switching from Winamp to r128gain.

Thanks.

Best regards,
Tom

Don't ignore files provided on the command-line in recursive mode

Thanks for the fantastic tool!

One little issue:

❯ r128gain -r --skip-tagged Alles\ tanzt\ _\ YADA\ Worship\ _\ Piano\ Tutorial\ \&\ Mainstage\ Patch.mp4
❯ r128gain --skip-tagged Alles\ tanzt\ _\ YADA\ Worship\ _\ Piano\ Tutorial\ \&\ Mainstage\ Patch.mp4
File 'Alles tanzt _ YADA Worship _ Piano Tutorial & Mainstage Patch.mp4' already has a track gain tag, skipping track gain scan
File 'Alles tanzt _ YADA Worship _ Piano Tutorial & Mainstage Patch.mp4': loudness = SKIPPED, sample peak = SKIPPED

I would expect it to also process provided files in recursive mode, like standard tools such as cp and mv.

Results shown in dbFS and not in LUFS

When running r128gain via the command line on a single file, the following text is outputted:

Analyzing loudness of file 'path/to/music.mp3'...
File 'path/to/music.mp3': loudness = -9.8 dbFS, peak = 0.6 dbFS
  1. Units of loudness and peak are given in dbFS, not in LUFS. Is this the expected behavior, or have the units been mixed up?
  2. If dbFS is the intended unit, it should read "dBFS".

iTMF meaning atom should probably not be uppercase

MP4/M4A tags are encoded under the COM.APPLE.ITUNES meaning by r128gain, but cmus only looks for com.apple.iTunes (case sensitive). I don't know if this is cmus's fault, but either way r128gain should probably be using the typical capitalization.

FFmpeg errors on Fedora 36

Having some trouble analyzing files on my new Fedora 36 installation. Previously ran Void Linux, where it worked fine.
Any clues to what it might be? I've ran plenty of manual ffmpeg commands fine. Can you debug the sent FFmpeg command in a better way?

[~] > r128gain -v debug -r -a ALBUM/
2022-07-31 17:23:53,216 MainThread: Detected FFmpeg lib versions: libavutil: 57.17.100, libavcodec: 59.18.100, libavformat: 59.16.100, libavdevice: 59.4.100, libavfilter: 8.24.100, libswscale: 6.4.100, libswresample: 4.3.100, libpostproc: 56.3.100
2022-07-31 17:23:53,304 ThreadPoolExecutor-0_0: Analyzing loudness of file 'ALBUM/SONG.flac'...
2022-07-31 17:23:53,304 ThreadPoolExecutor-0_1: Analyzing loudness of file 'ALBUM/SONG.flac'...
2022-07-31 17:23:53,368 ThreadPoolExecutor-0_0: /usr/bin/ffmpeg -threads 1 -i ALBUM/SONG.flac -filter_complex_script /tmp/r128gain_vy3zyw9d/ffmpeg_filters -map '[s3]' -map '[s6]' -f null -filter_complex_threads 1 /dev/null -hide_banner -nostats
2022-07-31 17:23:53,368 ThreadPoolExecutor-0_1: /usr/bin/ffmpeg -threads 1 -i ALBUM/SONG.flac -filter_complex_script /tmp/r128gain_9xw6yid5/ffmpeg_filters -map '[s3]' -map '[s6]' -f null -filter_complex_threads 1 /dev/null -hide_banner -nostats
2022-07-31 17:23:53,434 MainThread: Failed to analyze files 'ALBUM/SONG.flac': CalledProcessError Command '['/usr/bin/ffmpeg', '-threads', '1', '-i', 'ALBUM/SONG.flac', '-filter_complex_script', '/tmp/r128gain_vy3zyw9d/ffmpeg_filters', '-ma
p', '[s3]', '-map', '[s6]', '-f', 'null', '-filter_complex_threads', '1', '/dev/null', '-hide_banner', '-nostats']' returned non-zero exit status 1.
2022-07-31 17:23:53,435 MainThread: Failed to analyze file 'ALBUM/SONG.flac': CalledProcessError Command '['/usr/bin/ffmpeg', '-threads', '1', '-i', 'ALBUM/SONG.flac', '-filter_complex_script', '/tmp/r128gain_9xw6yid5/ffmpeg_filters', '-map
', '[s3]', '-map', '[s6]', '-f', 'null', '-filter_complex_threads', '1', '/dev/null', '-hide_banner', '-nostats']' returned non-zero exit status 1.
2022-07-31 17:23:53,435 MainThread: File 'ALBUM/SONG.flac': loudness = SKIPPED, sample peak = SKIPPED
2022-07-31 17:23:53,435 MainThread: Album 'ALBUM': loudness = SKIPPED, sample peak = SKIPPED
[~] > ffmpeg -version
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-librtmp --enable-librubberband --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
libavutil      57. 17.100 / 57. 17.100
libavcodec     59. 18.100 / 59. 18.100
libavformat    59. 16.100 / 59. 16.100
libavdevice    59.  4.100 / 59.  4.100
libavfilter     8. 24.100 /  8. 24.100
libswscale      6.  4.100 /  6.  4.100
libswresample   4.  3.100 /  4.  3.100
libpostproc    56.  3.100 / 56.  3.100

Unicode error

Don't know why (probably weird file names?) but -s switch can give this error:

Traceback (most recent call last):                                                                                                                                            
  File "/home/user/.local/bin/r128gain", line 8, in <module>
    sys.exit(cl_main())
  File "/home/user/.local/lib/python3.8/site-packages/r128gain/__init__.py", line 784, in cl_main
    err_count = process_recursive(args.path,
  File "/home/user/.local/lib/python3.8/site-packages/r128gain/__init__.py", line 583, in process_recursive
    dir_futures = scan(album_filepaths,
  File "/home/user/.local/lib/python3.8/site-packages/r128gain/__init__.py", line 234, in scan
    logger().info("File '%s' already has a track gain tag, skipping track gain scan" % (audio_filepath))
  File "/usr/lib/python3.8/logging/__init__.py", line 1434, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1577, in _log
    self.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1587, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1649, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 950, in handle
    self.emit(record)
  File "/home/user/.local/lib/python3.8/site-packages/r128gain/tqdm_logging.py", line 21, in emit
    self.tqdm.write(msg)
  File "/home/user/.local/lib/python3.8/site-packages/tqdm/std.py", line 585, in write
    fp.write(s)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udca0' in position 156: surrogates not allowed

No pause/resume for larger collections

Hey there!
Thanks for this great piece of software... it really is cool, and works well.
Here is the situation, though... The collection it's chewing through now is about 400gb mp3... (About 93,000 songs in total)
As it's the first time this fine utility is running, I want to to obliterate any old replaygain tags.
The collection is ordered by artist, and there are 11,000 of those.
So, what I have done is to make a list of the subdirectories, and a small script that runs this fine utility on each of them.
This is easily achieved by ls -rt > Somefile.txt

The script is then run in the root directory of the collection, and supplied the text as input. It's attached here, and I give the devs full permission to use it in any way they see fit, and claim no copyright on it whatsoever.
Replay_Gain.zip

This script can be interrupted, and re-started at a later date. It will re-do the directory it was busy with when it was interrupted, providing a nice pause/resume functionality that survives reboots.

Display summary in recursive mode

a little bit like tree, something like: "Found X tracks in Y directories, updated tags for N of them" - this would help me to verify its work

Feature request: only treat those files as one album that also have identical album tags

Currently, enabling album gain will treat any (supported) audio files in one folder as one album. Which is problematic if tracks from multiple albums are in one folder. Only in the case of mistagged files, the current behavior is preferable. In my case, track collection of countless albums in one folder, album tag awareness would be very useful.
I think that ideally, album tag awareness should be the default, with the option to disable it.
In the special case of no album tag I would prefer them to not be bundled to one album for album gain calculation by default.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.