#dsp #audio

ebur128

Implementation of the EBU R128 loudness standard

10 releases

0.1.8 Apr 27, 2023
0.1.7 Oct 28, 2022
0.1.6 Jul 13, 2021
0.1.5 Sep 7, 2020
0.0.0 Jan 5, 2020

#346 in Multimedia

Download history 1120/week @ 2024-01-03 1342/week @ 2024-01-10 1239/week @ 2024-01-17 1946/week @ 2024-01-24 1721/week @ 2024-01-31 2072/week @ 2024-02-07 1708/week @ 2024-02-14 1860/week @ 2024-02-21 1615/week @ 2024-02-28 2165/week @ 2024-03-06 1769/week @ 2024-03-13 1800/week @ 2024-03-20 1820/week @ 2024-03-27 2285/week @ 2024-04-03 2347/week @ 2024-04-10 2092/week @ 2024-04-17

8,821 downloads per month
Used in 4 crates

MIT license

295KB
6.5K SLoC

ebur128 crates.io Actions Status docs.rs

Implementation of the EBU R128 loudness standard.

The European Broadcasting Union Loudness Recommendation (EBU R128) informs broadcasters how they can analyze and normalize audio so that each piece of audio sounds roughly the same volume to the human ear.

This crate provides an API which analyzes audio and outputs perceived loudness. The results can then be used to normalize volume during playback.

Features:

  • Implements M, S and I modes (EBU - TECH 3341)
  • Implements loudness range measurement (EBU - TECH 3342)
  • True peak scanning
  • Supports all samplerates by recalculation of the filter coefficients

This crate is a Rust port of the libebur128 C library, produces the same results as the C library and has comparable performance.

EBU TECH 3341/3342 Compliance

Currently, the implementation passes all tests defined in EBU - TECH 3341 and EBU - TECH 3342.

C API

ebur128 optionally provides a C API that is API/ABI-compatible with libebur128. It can be built and installed via cargo-c:

# If cargo-c was not installed yet
$ cargo install cargo-c
# Change the prefix to the place where it should be installed
$ cargo cbuild --prefix /usr/local
$ cargo cinstall --prefix /usr/local

This installs a shared library, static library, C header and pkg-config file that is compatible with libebur128.

LICENSE

ebur128 is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT).

Contribution

Any kinds of contributions are welcome as a pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in ebur128 by you shall be licensed under the MIT license as above, without any additional terms or conditions.

Dependencies

~230KB