Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Batch Exporting Audio
Clone this wiki locally
Normalizing Audio by Perceived Loudness
The ITU BS.1770 loudness standard is a specification for determining the perceived loudness of audio for broadcast applications. In the EU, Japan, and the US, broadcast media is either required or suggested to be at or around -23 or -24 LUFS (Loudness Units relative to Full Scale) using this method. These guidelines/requirements help to prevent drastic changes in loudness when switching from one channel to the next or when a new program or commercial comes on.
These broadcast standards do not apply to the web and mobile devices. Because of the nature of the mobile media experience (tiny speakers, noisy environments, etc.), there is a need for media to be louder than the broadcast standard to provide a sufficiently audible experience to the greatest possible number of listeners. With many content producers following Apple's lead in this area, a (pseudo-)standard has emerged and become popular in audio production for mobile devices and the web: -16 LUFS. This provides a sufficient boost in loudness over the broadcast standard, with only a minimal reduction in dynamic range possible for most files.
Batch Normalization in Adobe Audition
It is quite easy to process large groups of audio files to be a consistent volume using these standards in Adobe Audition. Here is a video demonstrating how to use this feature. The settings used in that video seem to be adequate for web and mobile games (Match to: ITU-R BS.1770-2, Loudness: -16 LUFS), but the "use limiting" checkbox should also be enabled, to prevent clipping in the case that a waveform would exceed 0 dB. The default settings of Look-Ahead Time: 12ms and Release Time: 200ms seem to give good results.
Not mentioned in that video is the "Export Settings" (at the bottom of the Match Volume panel), which allow automatic exporting of the audio files once the loudness has been adjusted. Audio should be exported from Audition in a non-compressed format, and all source material should be retained, as dynamic range may be lost in the normalization process. Audition sometimes produces glitchy files when exporting to compressed formats - Audacity tends to produce better results when compressing files.
Compressing multiple audio files using Audacity:
- Audacity - Free audio editing tool
- LAME for Audacity - Open Source MP3 encoding library (unlicensed implementation of patented algorithm - use at own discretion)
Method 1: Export Multiple
- Open Audacity or create a new Audacity Project (File->New)
- Drag finalized, uncompressed audio files into project window (may take a while to import all files)
- Click "File->Export Multiple"
- Select desired format in "Export format" dropdown
- Select desired quality level in "Options" menu to the right of "Export format" dropdown
- Click "Export", then click "OK" to accept metadata for each track - when finished setting metadata, batch export of all tracks will begin.
Repeat steps 3 through 6 for all desired file formats.
Method 2: Batch Processing
(More initial setup, less clicking)
- Open Audacity
- Click "File->Edit Chains"
- Click "Add" to create a new Chain (give it a name)
- Click "Insert" to add a new command
- Double-click "Export MP3" then click "OK"
- Click "Insert" to add a second command
- Double-click "Export OGG" then click "OK"
- Click "OK" to save Chain
- IMPORTANT: open a test file, and export in both MP3 and OGG at desired quality using "File->Export" - the export commands in your Chain will export at the last-used quality settings.
- Close your test file (and any other open files) and create a new Audacity project.
- Click "File->Apply Chain"
- Select the Chain you created, and click "Apply to Files..."
- Browse to the files you wish to convert, select them all then click "Open"
- The files will be exported to a folder named "cleaned" in the location where the original files are
For future conversions you can start with step 11 (or step 9 if quality change is required)