Skip to main content

Normalize audio via ffmpeg

Project description

ffmpeg-normalize

Build Status PyPI version

A utility for batch-normalizing audio using ffmpeg.

This program normalizes media files to a certain loudness level using the EBU R128 loudness normalization procedure. It can also perform RMS-based normalization (where the mean is lifted or attenuated), or peak normalization to a certain target level.

Batch processing of several input files is possible, including video files.

Contents:


Requirements

Installation

pip3 install ffmpeg-normalize

Or download this repository, then run pip install ..

Usage

ffmpeg-normalize [-h] [-o OUTPUT [OUTPUT ...]] [-of OUTPUT_FOLDER] [-f]
                    [-d] [-v] [-n] [-pr] [--version] [-nt {ebu,rms,peak}]
                    [-t TARGET_LEVEL] [-p] [-lrt LOUDNESS_RANGE_TARGET]
                    [-tp TRUE_PEAK] [--offset OFFSET] [--dual-mono]
                    [-c:a AUDIO_CODEC] [-b:a AUDIO_BITRATE]
                    [-ar SAMPLE_RATE] [-koa] [-prf PRE_FILTER]
                    [-pof POST_FILTER] [-vn] [-c:v VIDEO_CODEC] [-sn]
                    [-mn] [-cn] [-e EXTRA_OUTPUT_OPTIONS]
                    [-ofmt OUTPUT_FORMAT] [-ext EXTENSION]
                    input [input ...]

For more information, run ffmpeg-normalize -h, or read on.

Description

Please read this section for a high level introduction.

What does the program do?

The program takes one or more input files and, by default, writes them to a folder called normalized, using an .mkv container. All audio streams will be normalized so that they have the same (perceived) volume.

How do I specify the input?

Just give the program one or more input files as arguments. It works with most media files.

How do I specify the output?

You can specify one output file name for each input file with the -o option. In this case, the container format (e.g. .wav) will be inferred from the file name extension that you've given.

If you don't specify the output file name for an input file, the container format will be MKV, and the output will be written to normalized/<input>.mkv.

Using the -ext option, you can supply a different output extension common to all output files, e.g. -ext m4a.

What will get normalized?

By default, all streams from the input file will be written to the output file. For example, if your input is a video with two language tracks and a subtitle track, both audio tracks will be normalized independently. The video and subtitle tracks will be copied over to the output file.

How will the normalization be done?

The normalization will be performed with the loudnorm filter from FFmpeg, which was originally written by Kyle Swanson. It will bring the audio to a specified target level. This ensures that multiple files normalized with this filter will have the same perceived loudness.

What codec is chosen?

The default audio encoding method is uncompressed PCM (pcm_s16le) to avoid introducing compression artifacts. This will result in a much higher bitrate than you might want, for example if your input files are MP3s.

Some containers (like MP4) also cannot handle PCM audio. If you want to use such containers and/or keep the file size down, use -c:a and specify an audio codec (e.g., -c:a aac for ffmpeg's built-in AAC encoder).

Examples

Normalize two WAV files and write them to the specified output files with uncompressed PCM WAV as audio codec:

ffmpeg-normalize file1.wav file2.wav -o file1-normalized.wav -o file2-normalized.wav

Normalize a number of videos in the current folder and write them to a folder called normalized, converting all audio streams to AAC with 192 kBit/s.

ffmpeg-normalize *.mkv -c:a aac -b:a 192k

For Windows, the above would be written as a loop:

for %%f in ("*.mkv") do ffmpeg-normalize "%%f" -c:a aac -b:a 192k

Normalize an MP3 file and write an MP3 file (you have to explicitly specify the encoder):

ffmpeg-normalize input.mp3 -c:a libmp3lame -b:a 320k -o output.mp3

Normalize many files, keeping PCM audio, but choosing a different container:

ffmpeg-normalize *.wav -c:a pcm_s16le -ext aif

Instead of EBU R128, one might just want to use simple peak normalization to 0 dB:

ffmpeg-normalize test.wav --normalization-type peak --target-level 0 --output normalized.wav
ffmpeg-normalize test.wav -nt peak -t 0 -o normalized.wav

You can (if you really need to!) also overwrite your input file. Warning, this will destroy data:

ffmpeg-normalize input.mp4 -o input.mp4 -f

If you need some fancy extra options, such as setting vbr for the libfdk_aac encoder, pass them to the -e/--extra-options argument:

ffmpeg-normalize input.m4a -c:a libfdk_aac -e='-vbr 3' -o output.m4a

Further examples? Please submit a PR so I can collect them.

Detailed Options

File Input/Output

  • input: Input media file(s)

  • -o OUTPUT [OUTPUT ...], --output OUTPUT [OUTPUT ...]: Output file names.

    Will be applied per input file.

    If no output file name is specified for an input file, the output files will be written to the default output folder with the name <input>.<ext>, where <ext> is the output extension (see -ext option).

  • -of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER: Output folder (default: normalized)

    This folder will be used for input files that have no explicit output name specified.

General

  • -f, --force: Force overwrite existing files

  • -d, --debug: Print debugging output

  • -v, --verbose: Print verbose output

  • -q, --quiet: Only print errors

  • -n, --dry-run: Do not run normalization, only print what would be done

  • -pr, --progress: Show progress bar for files and streams

  • --version: Print version and exit

Normalization

  • -nt {ebu,rms,peak}, --normalization-type {ebu,rms,peak}: Normalization type (default: ebu).

    EBU normalization performs two passes and normalizes according to EBU R128.

    RMS-based normalization brings the input file to the specified RMS level.

    Peak normalization brings the signal to the specified peak level.

  • -t TARGET_LEVEL, --target-level TARGET_LEVEL: Normalization target level in dB/LUFS (default: -23).

    For EBU normalization, it corresponds to Integrated Loudness Target in LUFS. The range is -70.0 - -5.0.

    Otherwise, the range is -99 to 0.

  • -p, --print-stats: Print first pass loudness statistics formatted as JSON to stdout.

EBU R128 Normalization

  • -lrt LOUDNESS_RANGE_TARGET, --loudness-range-target LOUDNESS_RANGE_TARGET: EBU Loudness Range Target in LUFS (default: 7.0).

    Range is 1.0 - 20.0.

  • -tp TRUE_PEAK, --true-peak TRUE_PEAK: EBU Maximum True Peak in dBTP (default: -2.0).

    Range is -9.0 - +0.0.

  • --offset OFFSET: EBU Offset Gain (default: 0.0).

    The gain is applied before the true-peak limiter. Range is -99.0 - +99.0.

  • --dual-mono: Treat mono input files as "dual-mono".

    If a mono file is intended for playback on a stereo system, its EBU R128 measurement will be perceptually incorrect. If set, this option will compensate for this effect. Multi-channel input files are not affected by this option.

Audio Encoding

  • -c:a AUDIO_CODEC, --audio-codec AUDIO_CODEC: Audio codec to use for output files.

    See ffmpeg -encoders for a list.

    Will use PCM audio with input stream bit depth by default.

  • -b:a AUDIO_BITRATE, --audio-bitrate AUDIO_BITRATE: Audio bitrate in bits/s, or with K suffix.

    If not specified, will use codec default.

  • -ar SAMPLE_RATE, --sample-rate SAMPLE_RATE: Audio sample rate to use for output files in Hz.

    Will use input sample rate by default.

  • -koa, --keep-original-audio: Copy original, non-normalized audio streams to output file

  • -prf PRE_FILTER, --pre-filter PRE_FILTER: Add an audio filter chain before applying normalization.

    Multiple filters can be specified by comma-separating them.

  • -pof POST_FILTER, --post-filter POST_FILTER: Add an audio filter chain after applying normalization.

    Multiple filters can be specified by comma-separating them.

    For EBU, the filter will be applied during the second pass.

Other Encoding Options

  • -vn, --video-disable: Do not write video streams to output

  • -c:v VIDEO_CODEC, --video-codec VIDEO_CODEC: Video codec to use for output files (default: 'copy').

    See ffmpeg -encoders for a list.

    Will attempt to copy video codec by default.

  • -sn, --subtitle-disable: Do not write subtitle streams to output

  • -mn, --metadata-disable: Do not write metadata to output

  • -cn, --chapters-disable: Do not write chapters to output

Output Format

  • -e EXTRA_OUTPUT_OPTIONS, --extra-output-options EXTRA_OUTPUT_OPTIONS: Extra output options list.

    A list of extra ffmpeg command line arguments.

    You can either use a JSON-formatted list (i.e., a list of comma-separated, quoted elements within square brackets), or a simple string of space-separated arguments.

    If JSON is used, you need to wrap the whole argument in quotes to prevent shell expansion and to preserve literal quotes inside the string. If a simple string is used, you need to specify the argument with -e=.

    Examples: -e '[ "-vbr", "3" ]' or -e="-vbr 3"

  • -ofmt OUTPUT_FORMAT, --output-format OUTPUT_FORMAT: Media format to use for output file(s).

    See ffmpeg -formats for a list.

    If not specified, the format will be inferred by ffmpeg from the output file name. If the output file name is not explicitly specified, the extension will govern the format (see '--extension' option).

  • -ext EXTENSION, --extension EXTENSION: Output file extension to use for output files that were not explicitly specified. (Default: mkv)

Environment Variables

The program additionally respects environment variables:

  • TMP / TEMP / TMPDIR

    Sets the path to the temporary directory in which files are stored before being moved to the final output directory. Note: You need to use full paths.

  • FFMPEG_PATH

    Sets the full path to an ffmpeg executable other than the system default.

FAQ

The program doesn't work because the "loudnorm" filter can't be found

Make sure you run ffmpeg v3.1 or higher and that loudnorm is part of the output when you run ffmpeg -filters. Many distributions package outdated ffmpeg 2.x versions, or (even worse), Libav's ffmpeg disguising as a real ffmpeg from the FFmpeg project.

Some ffmpeg builds also do not have the loudnorm filter enabled.

You can always download a static build from their website and use that.

If you have to use an outdated ffmpeg version, you can only use rms or peak as normalization types, but I can't promise that the program will work correctly.

Should I use this to normalize my music collection?

When you run ffmpeg-normalize and re-encode files with MP3 or AAC, you will inevitably introduce generation loss. Therefore, I do not recommend running this on your precious music collection, unless you have a backup of the originals or accept potential quality reduction. If you just want to normalize the subjective volume of the files without changing the actual content, consider using MP3Gain and aacgain.

Why are my output files MKV?

I chose MKV as a default output container since it handles almost every possible combination of audio, video, and subtitle codecs. If you know which audio/video codec you want, and which container is supported, use the output options to specify the encoder and output file name manually.

The conversion does not work and I get a cryptic ffmpeg error!

One possible reason is that the input file contains some streams that cannot be mapped to the output file. Examples:

  • You are trying to normalize a movie file, writing to a .wav or .mp3 file. WAV/MP3 files only support audio, not video. Disable video and subtitles with -vn and -sn, or choose a container that supports video (e.g. .mkv).

  • You are trying to normalize a file, writing to an .mp4 container. This program defaults to PCM audio, but MP4 does not support PCM audio. Make sure that your audio codec is set to something MP4 containers support (e.g. `-c:a aac).

The default output container is .mkv as it will support most input stream types. If you want a different output container, make sure that it supports your input file's video, audio, and subtitle streams (if any).

Also, if there is some other broken metadata, you can try to disable copying over of metadata with -mn.

What are the different normalization algorithms?

  • EBU R128 is an EBU standard that is commonly used in the broadcasting world. The normalization is performed using a psychoacoustic model that targets a subjective loudness level measured in LUFS (Loudness Unit Full Scale). R128 is subjectively more accurate than any peak or RMS-based normalization. More info on R128 can be found in the official document and the loudnorm filter description by its original author.

  • Peak Normalization analyzes the peak signal level in dBFS and increases the volume of the input signal such that the maximum in the output is 0 dB (or any other chosen threshold). Since spikes in the signal can cause high volume peaks, peak normalization might still result in files that are subjectively quieter than other, non-peak-normalized files.

  • RMS-based Normalization analyzes the RMS power of the signal and changes the volume such that a new RMS target is reached. Otherwise it works similar to peak normalization.

Couldn't I just run loudnorm with ffmpeg?

You absolutely can. However, you can get better accuracy and linear normalization with two passes of the filter. Since ffmpeg does not allow you to automatically run these two passes, you have to do it yourself and parse the output values from the first run. If this program is too over-engineered for you, you could also use an approach such as featured in this Ruby script that performs the two loudnorm passes.

After updating, this program does not work as expected anymore!

You are probably using a 0.x version of this program. There are significant changes to the command line arguments and inner workings of this program, so please adapt your scripts to the new one. Those changes were necessary to address a few issues that kept piling up; leaving the program as-is would have made it hard to extend it. You can continue using the old version (find it under Releases on GitHub or request the specific version from PyPi), but it will not be supported anymore.

Can I buy you a beer / coffee / random drink?

If you found this program useful and feel like giving back, feel free to send a donation via PayPal.

License

The MIT License (MIT)

Copyright (c) 2015-2018 Werner Robitza

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changelog

v1.17.0 (2020-04-10)

  • Bump version to 1.17.0. [Werner Robitza]

  • Update release script and changelog template. [Werner Robitza]

  • Apply pre-filters in all first passes, fixes #118. [Werner Robitza]

    This allows properly reading the level for any kind of normalization, even if filters affect the loudness in the first pass.

v1.16.0 (2020-04-07)

  • Bump version to 1.16.0. [Werner Robitza]

  • Add all commits to changelog. [Werner Robitza]

  • Remove python 2 support. [Werner Robitza]

  • Add quiet option, fixes #116. [Werner Robitza]

    • Add a new quiet option
    • Promote some warnings to actual errors that need to be shown
    • Add a very basic test case

v1.15.8 (2020-03-15)

  • Bump version to 1.15.8. [Werner Robitza]

  • Improve release script. [Werner Robitza]

  • Python 3.8. [Werner Robitza]

v1.15.7 (2020-03-14)

  • Bump version to 1.15.7. [Werner Robitza]

  • Only print length warning for non-EBU type normalization. [Werner Robitza]

v1.15.6 (2019-12-04)

  • Bump version to 1.15.6. [Werner Robitza]

  • Remove build and dist folder on release. [Werner Robitza]

  • Do not exit on error in batch processing. [Werner Robitza]

    Simply process the next file if one has errors, addresses #110.

v1.15.5 (2019-11-19)

  • Bump version to 1.15.5. [Werner Robitza]

  • Use minimal dependency for tqdm. [Werner Robitza]

  • Remove specific python version requirement. [Werner Robitza]

v1.15.4 (2019-11-19)

  • Bump version to 1.15.4. [Werner Robitza]

  • Freeze tqdm version. [Werner Robitza]

  • Update python to 3.7. [Werner Robitza]

  • Improve release documentation. [Werner Robitza]

v1.15.3 (2019-10-15)

  • Bump version to 1.15.3. [Werner Robitza]

  • Do not print stream warning when there is only one stream. [Werner Robitza]

  • Remove previous dist versions before release. [Werner Robitza]

v1.15.2 (2019-07-12)

  • Bump version to 1.15.2. [Werner Robitza]

  • Warn when duration cannot be read, fixes #105. [Werner Robitza]

  • Update README. [Werner Robitza]

    minor improvements in the description

v1.15.1 (2019-06-17)

  • Bump version to 1.15.1. [Werner Robitza]

  • Add output to unit test failures. [Werner Robitza]

  • Fix input label for audio stream. [Werner Robitza]

v1.15.0 (2019-06-17)

  • Bump version to 1.15.0. [Werner Robitza]

  • Add pre-and post-filter hooks, fixes #67. [Werner Robitza]

    This allows users to specify filters to be run before or after the actual normalization call, using regular ffmpeg syntax. Only applies to audio.

  • Document audiostream class. [Werner Robitza]

  • Warn when file is too short, fixes #87. [Werner Robitza]

  • Update release method to twine. [Werner Robitza]

v1.14.1 (2019-06-14)

  • Bump version to 1.14.1. [Werner Robitza]

  • Handle progress output from ffmpeg, fixes #10. [Werner Robitza]

  • Merge pull request #99 from Nottt/patch-1. [Werner Robitza]

    fix -cn description

  • Fix -cn description. [Nottt]

  • Add nicer headers for options in README. [Werner Robitza]

v1.14.0 (2019-04-24)

  • Bump version to 1.14.0. [Werner Robitza]

  • Add version file in release script before committing. [Werner Robitza]

  • Add option to keep original audio, fixes #83. [Werner Robitza]

  • Add pypi badge. [Werner Robitza]

  • Allow release script to add changelog for future version; upload to pypi. [Werner Robitza]

  • Bump version to 1.13.11. [Werner Robitza]

v1.13.11 (2019-04-16)

  • Bump version to 1.13.11. [Werner Robitza]

  • Add release script. [Werner Robitza]

  • Add small developer guide on releasing. [Werner Robitza]

  • Move HISTORY.md to CHANGELOG.md. [Werner Robitza]

  • Fix ffmpeg static build download location. [Werner Robitza]

v1.3.10 (2019-02-22)

  • Bump version. [Werner Robitza]

  • Cap measured input loudness, fixes #92. [Werner Robitza]

v1.3.9 (2019-01-10)

  • Bump version. [Werner Robitza]

  • Fix handling of errors with tqdm. [Werner Robitza]

  • Improve readme. [Werner Robitza]

  • Delete issue template. [Werner Robitza]

  • Bump version. [Werner Robitza]

  • Clarify extra argument options, move to main entry point. [Werner Robitza]

  • Update issue templates. [Werner Robitza]

v1.3.8 (2018-11-28)

  • Bump version. [Werner Robitza]

  • Clarify extra argument options, move to main entry point. [Werner Robitza]

v1.3.7 (2018-10-28)

  • Bump version. [Werner Robitza]

  • Copy metadata from individual streams, fixes #86. [Werner Robitza]

  • Add python version for pyenv. [Werner Robitza]

v1.3.6 (2018-07-09)

  • Bump version. [Werner Robitza]

  • Update README, fixes #79 and addresses #80. [Werner Robitza]

v1.3.5 (2018-06-12)

  • Bump version. [Werner Robitza]

  • Minor README updates. [Werner Robitza]

  • Fix documentation of TMPDIR parameter. [Werner Robitza]

v1.3.4 (2018-05-05)

  • Bump version. [Werner Robitza]

  • New way to specify extra options. [Werner Robitza]

v1.3.3 (2018-05-05)

  • Update README. [Werner Robitza]

  • Decode strings in extra options. [Werner Robitza]

v1.3.2 (2018-04-25)

  • Bump version. [Werner Robitza]

  • Merge pull request #69 from UbiCastTeam/master. [Werner Robitza]

    Stderror decoding ignoring utf8 encoding errors

  • Stderror decoding ignoring utf8 encoding errors. [Anthony Violo]

v1.3.1 (2018-04-24)

  • Bump version. [Werner Robitza]

  • Do not require main module in setup.py, fixes #68. [Werner Robitza]

v1.3.0 (2018-04-15)

  • Bump version. [Werner Robitza]

  • Remove dead code. [Werner Robitza]

  • Fix for python2 division. [Werner Robitza]

  • Update documentation. [Werner Robitza]

  • Progress bar. [Werner Robitza]

  • Remove imports from test file. [Werner Robitza]

  • Fix travis file. [Werner Robitza]

  • WIP: progress bar. [Werner Robitza]

  • Minor typo in option group. [Werner Robitza]

  • Add simple unit test for disabling chapters. [Werner Robitza]

v1.2.3 (2018-04-11)

  • Fix unit test. [Werner Robitza]

  • Bump version. [Werner Robitza]

  • Add option to disable chapters, fixes #65, also fix issue with metadata. [Werner Robitza]

v1.2.2 (2018-04-10)

  • Bump version. [Werner Robitza]

  • Set default loudness target to -23, fixes #48. [Werner Robitza]

v1.2.1 (2018-04-04)

  • Bump version. [Werner Robitza]

  • Merge pull request #64 from UbiCastTeam/encoding-issue. [Werner Robitza]

    Stdout and stderror decoding ignoring utf8 encoding errors

  • Stdout and stderror decoding ignoring utf8 encoding errors. [Anthony Violo]

v1.2.0 (2018-03-22)

  • Bump version. [Werner Robitza]

  • Add errors for impossible format combinations, fixes #60. [Werner Robitza]

  • Fix ordering of output maps, fixes #63. [Werner Robitza]

  • Improve documentation. [Werner Robitza]

v1.1.0 (2018-03-06)

  • Add option to print first pass statistics. [Werner Robitza]

v1.0.10 (2018-03-04)

  • Bump version. [Werner Robitza]

  • Restrict parsing to valid JSON part only, fixes #61. [Werner Robitza]

  • Add an example for MP3 encoding. [Werner Robitza]

  • Update paypal link. [Werner Robitza]

v1.0.9 (2018-02-08)

  • Bump version. [Werner Robitza]

  • Add normalized folder to gitignore. [Werner Robitza]

  • Do not print escape sequences on Windows. [Werner Robitza]

  • Do not check for file existence, fixes #57. [Werner Robitza]

  • Add github issue template. [Werner Robitza]

v1.0.8 (2018-02-01)

  • Bump version. [Werner Robitza]

  • Do not check for ffmpeg upon module import. [Werner Robitza]

v1.0.7 (2018-02-01)

  • Bump version. [Werner Robitza]

  • Rename function test. [Werner Robitza]

  • Fix issue with wrong adjustment parameters, fixes #54. [Werner Robitza]

v1.0.6 (2018-01-30)

  • Allow setting FFMPEG_PATH and document TMP. [Werner Robitza]

v1.0.5 (2018-01-26)

  • Handle edge case for short input clips. [Werner Robitza]

v1.0.4 (2018-01-26)

  • Bump version. [Werner Robitza]

  • Do not try to remove nonexisting file in case of error in command. [Werner Robitza]

v1.0.3 (2018-01-26)

  • Bump version. [Werner Robitza]

  • Always streamcopy when detecting streams to avoid initializing encoder. [Werner Robitza]

  • Fix handling of temporary file. [Werner Robitza]

  • Add build status. [Werner Robitza]

  • Travis tests. [Werner Robitza]

v1.0.2 (2018-01-25)

  • Fix bug with target level for peak/RMS. [Werner Robitza]

  • Update documentation formatting. [Werner Robitza]

  • Update history. [Werner Robitza]

v1.0.1 (2018-01-24)

  • Bump version. [Werner Robitza]

  • Set default target to -23. [Werner Robitza]

v1.0.0 (2018-01-23)

  • Add version info and test case for dry run. [Werner Robitza]

  • New feature detection, add documentation, contributors guide etc. [Werner Robitza]

  • WIP: v1.0 rewrite. [Werner Robitza]

v0.7.3 (2017-10-09)

  • Use shutil.move instead of os.rename. [Werner Robitza]

v0.7.2 (2017-09-17)

  • Allow setting threshold to 0. [Werner Robitza]

v0.7.1 (2017-09-14)

  • Bump version. [Werner Robitza]

  • Update HISTORY.md. [Werner Robitza]

  • Merge pull request #37 from Mathijsz/fix-which-path-expansion. [Werner Robitza]

    expand tilde and environment variables, fixes #36

  • Expand tilde and environment variables, fixes #36. [Mathijs]

  • Update HISTORY.md. [Werner Robitza]

  • Update README w.r.t. loudnorm filter. [Werner Robitza]

  • Update README and indentation. [Werner Robitza]

v0.7.0 (2017-08-02)

  • Bump version. [Werner Robitza]

  • Fix handling of extra options with spaces. [Werner Robitza]

  • Include test script. [Werner Robitza]

  • Logging and other improvements. [Werner Robitza]

  • Add test files. [Werner Robitza]

  • Autopep8 that thing. [Werner Robitza]

  • Logger improvements. [Werner Robitza]

  • Add example for overwriting. [Werner Robitza]

v0.6.0 (2017-07-31)

  • Allow overwriting input file, fixes #22. [Werner Robitza]

  • Version bump. [Werner Robitza]

  • Better handle cmd arguments. [Werner Robitza]

  • Update README.md. [Werner Robitza]

    add another example

v0.5.1 (2017-04-04)

  • Fix for problem introduced in 304e8df. [Werner Robitza]

v0.5 (2017-04-02)

  • Fix pypi topics. [Werner Robitza]

  • Bump version and README. [Werner Robitza]

  • Fix issue where output was wrong format. [Werner Robitza]

  • Add EBU R128 filter. [Werner Robitza]

  • Use Markdown instead of RST for README/HISTORY. [Werner Robitza]

  • Define file encode for python3, fixes #24. [Werner Robitza]

  • Fix history. [Werner Robitza]

  • Fix option -np. [Werner Robitza]

  • Clarify merge option. [Werner Robitza]

  • Minor documentation improvements. [Werner Robitza]

    • change README from CRLF to LF
    • add "attenuated" in description
    • extend LICENSE year
    • add license to main README

v0.4.1 (2017-02-13)

  • Update for release. [Werner Robitza]

  • Merge pull request #21 from mpuels/patch-1. [Werner Robitza]

    Fix for #13

  • Fix for #13. [mpuels]

  • Mention Python 3. [Werner Robitza]

    mention that Python 3 may work, just didn't have time to test

  • Fix README's code blocks. [Werner Robitza]

v0.4 (2017-01-24)

  • Code cleanup, add option to set format and audio codec. [Werner Robitza]

v0.3 (2017-01-19)

  • Add option for no prefix, fixes #20. [Werner Robitza]

  • Handle multiple spaces in path; fixes issue #18. [Werner Robitza]

  • Handle spaces in path, fixes #12. [Werner Robitza]

  • Update README.rst. [Werner Robitza]

  • Change default level back to -26. [Werner Robitza]

  • Typo in README example. [Werner Robitza]

  • Update documentation. [Werner Robitza]

  • Bump to v0.2.0. [Werner Robitza]

    • Support for multiple files and output directories.
    • Support merging of audio with input file
    • Set audio codec and additional options
    • User-definable threshold
    • Better error handling and logging
    • Deprecates avconv
  • Change default level back to -28. [Werner Robitza]

  • Merge pull request #15 from auricgoldfinger/master. [Werner Robitza]

    Add extended normalisation options

  • Add extended normalisation options. [bert]

    • add program option to write output in a separate directory in stead of prefixing it

    • add program option to merge the normalized audio in the original (video) file rather than creating a separate WAV file

    • change the maximum setting: will now normalize so that max volume is set to 0, adjusted with the given level. e.g. : -m -l -5 will increase the audio level to max = -5.0dB

    • improve verbose logging: number of files are written to the info log

    • improve performance: check first whether the output file exists before calculating the volume levels + not modifying the file if the adjustment < 0.5dB (level is never exactly 0)

  • Update README, fixes #11. [Werner Robitza]

v0.1.3 (2015-12-15)

  • Check for Windows .exe, fixes #10. [Werner Robitza]

  • Check path and fix #9. [Werner Robitza]

  • Merge pull request #8 from benjaoming/master. [Werner Robitza]

    Add MANIFEST.in

  • Bump version. [Benjamin Bach]

  • Add manifest to include missing files in sdist. [Benjamin Bach]

  • Merge pull request #6 from jetpks/master. [Werner Robitza]

    Fixed ffmpeg v2.6.3 compatibility and docopt config

  • Updated to work with ffmpeg v2.6.3, and fixed broken docopt config. [Eric Jacobs]

    ffmpeg update:

    ffmpeg v2.6.3 puts mean_volume on stderr instead of stdout, causing output in ffmpeg_get_mean to be completely empty, and no match for mean_volume or max_volume to be found.

    Fixed by adding stderr=subprocess.PIPE in both Popen calls in run_command, and combining stdout and stderr on return. We already exit with non-zero return, so combining stderr/stdout shouldn't cause any poor side-effects.

    docopt config:

    • args['--level'] was not recognizing its default because there was an errant comma between -l and --level, and it needed after the arguments.
    • Fixed spacing for --max
    • Removed quotes around 'normalized' so single quote characters don't end up in the output file names.
  • Removed Windows carraige returns from main.py. [Eric Jacobs]

  • Merge pull request #5 from mvbattista/master. [Werner Robitza]

    Installation update to ffmpeg

  • Installation update to ffmpeg. [Michael V. Battista]

  • Update to ffmpeg. [Werner Robitza]

  • Update HISTORY.rst. [Werner Robitza]

  • Update to ffmpeg. [Werner Robitza]

  • Merge pull request #4 from benjaoming/rename. [Werner Robitza]

    Rename project

  • Make at least one file mandatory. [Benjamin Bach]

  • Rename project and remove pyc file. [Benjamin Bach]

  • Merge pull request #2 from benjaoming/docopt-setuptools-avconv. [Werner Robitza]

    Docopt, Setuptools, avconv compatibility

  • Use docopt. [Benjamin Bach]

  • Use normalize-audio when using avconv because it doesn't have a way to measure volume. [Benjamin Bach]

  • Functional setup.py, communicate with avconv/ffmpeg about overwriting. [Benjamin Bach]

  • Also detect avconv. [Benjamin Bach]

  • Use a main function instead. [Benjamin Bach]

  • Add a history for the project. [Benjamin Bach]

  • Move to more unique module name. [Benjamin Bach]

  • Update README.rst. [benjaoming]

  • Change the README to rst (PyPi) [Benjamin Bach]

  • Delete .gitignore. [Werner Robitza]

  • Update README.md. [Werner Robitza]

  • Various improvements, fixes #1. [Werner Robitza]

  • License. [Werner Robitza]

  • Livense. [Werner Robitza]

  • Update README.md. [Werner]

  • Merge branch 'master' of https://github.com/slhck/audio-normalize. [Werner Robitza]

  • Initial commit. [Werner]

  • Initial commit. [Werner Robitza]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ffmpeg-normalize-1.17.0.tar.gz (2.0 MB view hashes)

Uploaded Source

Built Distribution

ffmpeg_normalize-1.17.0-py2.py3-none-any.whl (29.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page