Skip to main content

Module mpv_backend

Module mpv_backend 

Source

StructsΒ§

InternalState πŸ”’
MpvBackend
MPV-based player backend for Linux

ConstantsΒ§

NORMALIZE_REF_LUFS πŸ”’
Reference loudness the peak table is anchored at (Normal preset, βˆ’14 LUFS).
NORMALIZE_REF_PEAK πŸ”’
Reference peak (dynaudnorm p, linear amplitude) for the default VolumeLevel::Normal (βˆ’14 LUFS) target, leaving βˆ’1.2 dB of headroom.

FunctionsΒ§

build_af_filter πŸ”’
Build the full MPV af (audio filter) value from the audio settings.
detect_audio_system πŸ”’
Detect which audio system is available on the system
eq_filter_entries πŸ”’
Peaking-EQ filter entries (unwrapped), one ffmpeg equalizer (two-pole peaking) per band with a non-zero gain, e.g. equalizer=f=31:width_type=o:width=1:g=5. Returns an empty vec when the EQ is disabled or every gain is ~0. Gains are assumed already normalised by AudioSettings::with_equalizer_normalised; bands beyond EQ_BANDS are ignored.
get_stream_url πŸ”’
Helper to get stream URL from MediaItem
normalize_filter_entry πŸ”’
The loudness-normalization filter entry (unwrapped), or None when normalization is disabled. Uses ffmpeg’s dynaudnorm, a gentle real-time dynamic normalizer that avoids the gain β€œpumping” loudnorm’s single-pass mode can produce on very dynamic material.