Based on discussions in the Complete Classical Music workflow, I present a command-line script to calculate individual track values of integrated LUFS, LRA and true peak using ebur128. In addition it will calculate the album integrated, LRA and TP and present all information in an html table format as well as on the screen.
Prerequisites: ebumeter, sox
Usage example: album-ebur128 *.flac
I recommend copying to /usr/local/bin or other appropriate directory included in $PATH. The loudness_analysis.html file is created wherever the script is run.
Thanks to @x42 for the tip about piping concatenated files to ebur128.
Any feedback for improving the likely inefficient scripting is very welcome as are any feature requests. A good use case for this script would be for comparing reference albums in order to achieve similar loudness values in an Ardour mastering session. Perhaps, also, a final check post-export.
You definitely don’t need to be adding .bash to anything to run it as an executable script. I think you should just copy the text using the green icon at the top of the paste.ee window and paste into a new file in featherpad or whatever Linux editor you use. Save as /usr/local/bin/album-ebur128 (or whatever you like!) and make it executable.
I think downloading the file directly from paste.ee adds the .bash by default and also the problematic Byte-order Mark (or BOM) that gives you the error on line 1. My original file and text pasted from paste.ee as suggested do not give this BOM error.
Can anyone suggest if I can do something differently or whether this is accepted practice to copy/paste versus downloading the file? Is this a common occurrence with pastebin sites? Even though my original file seems great, at some point in the chain of making this available for public use, either a BOM error or CRLF breaks are introduced.
Turns out that the comma in the filename of track 5 “It Took Me so Long to Get Here, But Here I Am” caused the HTML table generation code to split the filename into two separate cells, thereby shifting numeric values one cell to the right.
Fixed script by adding a sed line to remove any commas in the generated filename list (N.B. This only affects the temporary list and NOT your files!). OP has the updated script.