Skip to main content

LoudnessMeter

Struct LoudnessMeter 

Source
pub struct LoudnessMeter { /* private fields */ }
Expand description

Measures EBU R128 integrated loudness, loudness range, and true peak.

Uses FFmpeg’s ebur128=metadata=1:peak=true filter graph internally. The analysis is self-contained — no external decoder is required.

§Examples

use ff_filter::LoudnessMeter;

let result = LoudnessMeter::new("audio.mp3").measure()?;
println!("Integrated: {:.1} LUFS", result.integrated_lufs);
println!("LRA: {:.1} LU", result.lra);
println!("True peak: {:.1} dBTP", result.true_peak_dbtp);

Implementations§

Source§

impl LoudnessMeter

Source

pub fn new(input: impl AsRef<Path>) -> Self

Creates a new meter for the given audio or video file.

Source

pub fn measure(self) -> Result<LoudnessResult, FilterError>

Runs EBU R128 loudness analysis and returns the result.

§Errors

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.