You are not logged in.

#1 2018-02-20 09:07:33

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,769

Alsa, loudnorm filter on master channel?

I have been using ffmpeg loudnorm filter with mpv for a while now
http://k.ylo.ph/2016/04/04/loudnorm.html
and would like to have the same on the system level (master channel or 'browser' channel), I imagine something like
https://packages.debian.org/stretch/libavdevice57
might be handy? How would I go with this, an example for any audio filter on alsa master? And a way for a user to switch the filter on/off easily.

Edit: Got an eq working as example, but unclear how to enable/disable easily, other than deleting .asoundrc.

Last edited by brontosaurusrex (2018-02-20 11:13:55)

Offline

#2 2018-02-20 11:49:59

earlybird
ほやほや
Registered: 2015-12-16
Posts: 700
Website

Re: Alsa, loudnorm filter on master channel?

Look into available LADSPA filters. For example, the alsaequal you are referring to above already uses the CAPS equalizer filter, which is a LADSPA plugin. You can load and configure generic LADSPA plugins using the asoundrc.

Filter on/off switching would probably amount to defining two ALSA plugs, one with filter on, one without the filter, and then switching between ALSA outputs in the application. For dynamic filter pipelines, I think most people have been using Jack. AFAICT Pulseaudio uses some ffmpeg code, but only for resamplers. I think the only generic framework which supports pipelines and is usable on Linux ATM is gstreamer. There is a new project in the works, pipewire, https://pipewire.org/, which seeks to solve exactly the problem you're having right now.

To sum up, I'd try LADSPA, then JACK. LADSPA is pretty powerful (http://www.penguinproducer.com/Blog/201 … e-removal/) but you seem to have to know what you're doing.

Online

#3 2018-02-20 14:18:13

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,769

Re: Alsa, loudnorm filter on master channel?

Right, ladspa loudnorm plug would do it I guess, but can't really google one. Jack seems to be ladspa oriented as well. For a serious pipeline work i'd expect a wonderful node oriented gui, but most of the time I don't have such high needs.
http://www.kxproject.com/images/p16v_route.gif

Last edited by brontosaurusrex (2018-02-20 14:26:12)

Offline

Board footer

Powered by FluxBB