Kodi Community Forum
Linux HOWTO Kodi with Equalizer on LinuxMint 20.1 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux HOWTO Kodi with Equalizer on LinuxMint 20.1 (/showthread.php?tid=360514)

Pages: 1 2 3 4 5 6 7


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-26

there is something strange going on
first I thought that the over 100% cpu would be an indicator but I have the same clip in 720p also and it uses 25% but stutters also when EQ is on.
1080p EQ on stutters  http://c-olo.com/s1.JPG
720p EQ on stutters  http://c-olo.com/s2.JPG


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-26

how many audio channels are you running? 5.1? Maybe your system is to weak for this. In this case, the system is irrelevant, pulseaudio-equalizer will not work for you.

Headless means without a Graphical user interface (such as gnome). Debian with gnome does not make any sense in this context. The motivation to install debian headless is to have a lean system, that boots fast directly into Kodi, without desktop. It is like libreElec / coreElec.
Kodi itself is based on Ubuntu, so a Ubuntu based system like Mint or Ubuntu itself make much more sense when installing a desktop.
Hotswap means that Kodi recognizes the plug and unplug of usb-drives

The set-up is more easy than you think. When you set-up a linux system, there are always two users, one of them is always called "root". The second user name you can choose, lets say we call him "azaha". "root" can do anything on the system, it has full access. The second user "azaha" has only a restricted access, this is for security reason.

After the installation process is finished and the system has been rebooted, you will see only 2 lines:
Code:

Debian GNU/Linux 11 kodi tty1

kodi login: _
 
there you type in "root", than you will be asked for the password, that you gave in the installation process.

After finishing with root, you can logout with "exit" and the above prompt will again be shown. No you can type in the user "azaha"....

Anyway navigating in the command line requires some patient, practice and the will to learn it. I can understand if you don't want to, in this case it is much better to stick with linux Mint or Windows.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-26

(2023-05-26, 12:50)azaha Wrote: there is something strange going on
first I thought that the over 100% cpu would be an indicator but I have the same clip in 720p also and it uses 25% but stutters also when EQ is on.
1080p EQ on stutters  http://c-olo.com/s1.JPG
720p EQ on stutters  http://c-olo.com/s2.JPG

OK, it is Kodi having a problem with decoding and displaying, pulseaudio only consumes 4.5% cpu. Not sure, maybe it is related running Kodi in a window. It would be worth trying in fullscreen mode.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-26

thanks 4 your patience.
OK headless sounds exactly what i want, so I will do what you suggest and wusel myself through the debian
no my setup is 2.1 not 5.1
BUT if I get it running i would prefer a 5.1 for the future setup, if this is too much for the little box, she will be replaced by someting stronger

I have an old laptop with the same processor what i tweaked so much the 5W TDP became 15W TDP and with the intel 500 graphicadapter (same as the box has) it could actually run gta 5 in minimal setting at playable framerates.
Gosh, that was 5 years ago, so my fancy box sure is oldish.

I just dug it out and will use it in the factory setting (5w) to see if this is a processor probem or something else.
I used to do a lot of crazy tuning before the tinitus melted my brain and Throttlestop could actually work with the processors.

Will be a few hours, I keep you posted


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-26

well, that both ended in desaster and I quit for now.
my mint installation works with most video files  and the few what cause a problem can be reencoded if needed.
I opt for a new hardware with power to spare.

So for right now I will be quite happy with what I got and if you could tell me how that with the sound level restriction (can´t remember the correct name) needs to be setup or what little tweaks there are (I stumbled over your latency article) I will be out of your hair.

again, thank you for your patience and help, you sure made my week


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-26

Sad to hear that it didn't work for you.

The compressor is documented here and I just saw that it is stereo only, I completely forgot about this, sorry.

To setup the compressor, select everything in the box below as a whole, open a terminal paste it into the terminal and press enter.

Code:

mkdir -p ~/.config/pulse
cp /etc/pulse/daemon.conf /etc/pulse/default.pa ~/.config/pulse/
echo -e 'load-module module-equalizer-sink sink_name=eq_1 sink_properties="device.description=EQ-1"\nload-module module-ladspa-sink sink_master=eq_1 sink_name=co_1 sink_properties="device.description=CO-1" plugin=sc4_1882 label=sc4 control=1,1.5,401,-20,20,5,15' >>  ~/.config/pulse/default.pa

I hope you have installed the swh-plugins package, if you are not sure just run the following command in the terminal window.
Code:

sudo apt install -y swh-plugins

to check if it had worked you can run
Code:

cat ~/.config/pulse/default.pa
This will show you the content of the file "default.pa". If not, something went wrong.

Then reboot.

It will create a compressor filter called CO1 which will feed its output to the static Equalizer EQ1. As sound output in Kodi select CO1.

The compressor is configured via the textfile ~/.config/pulse/default.pa, you can open it with a text editor. However I would leave the settings as they are.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-26

Perfect! Works like a charm (or night setting used to work an a good amplifier, nah even better)

OK no how do I turn it off? or what parameters are to set to make it less strict?

You do not have by any chance a nice gui as you did for the equalizer?

To be honest, this is stuff Kodi should have since years and not redesigning a good mediacenter for the x time and making is worse and breaking all the beautyful skins

If I may ask, what country are you in? looks like we are pretty close UTC wise.

oh and thank you, because of what I can do now (enjoying my sound again and playing with different speakers) the old Bee-Link AP34 box will be replaced with a nice Bee-Link mini s12 what has good the double of power and should work like a charm for the next years. After I saw that this box has an unlocked bios where you can actually get a lot more power out of it and has a good quiet aktive cooling system, I was sold for 177 Euro.

I will read a bit about your wiki since the tip with the 350 ms offset is right on the money and will fiddle a bit around with some settings to see what I can screw up
oh, the "only stereo" is quiet right, the subwoofer is quiet tame even with +12db (for testing)


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-27

To turn it off, just select EQ1 directly in the output selection menu. I have a shortcut on my remote directly to this menu.

Due to system limitations, it is unfortunately not so easy to develop a gui for this. Maybe one day I will develop an equalizer combined with a compressor from scratch, this is not so difficult but time consuming.  Also I wait on pipewire to come along, the new linux audio system. Kodi has a better support for this in the latest release. If this will be accepted by the community (also libreelec) then this will be the way to go.

In the meantime I can offer you a work around. You can define multiple compressors with different settings in the  ~/.config/pulse/default.pa file. 

To find good settings without rebooting the system all the time you can do the following.

First you need
Code:

sudo apt install pavucontrol
pavucontrol&

Then you can load compressor modules with the command below. Of course you can alter the settings after "control="

Code:

pactl load-module module-ladspa-sink plugin=sc4_1882 label=sc4 control=1,1.5,401,-20,20,5,15

it will print the module number, e.g. 35. to unload the module enter
Code:

pactl unload-module 35

in pavucontrol you can route the audio stream through the newly loaded module.

And to answer you question, I am in Germany.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-27

Enclosed what the values after "control=" mean and what their range is from left to right:
Code:

      <name>RMS/peak</name>
      <p>The balance between the RMS and peak envelope followers.</p>
      <p>RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.</p>
      <range min="0" max="1"/>

      <name>Attack time (ms)</name>
      <p>The attack time in milliseconds.</p>
      <range min="1.5" max="400"/>

      <name>Release time (ms)</name>
      <p>The release time in milliseconds.</p>
      <range min="2" max="800"/>

      <name>Threshold level (dB)</name>
      <p>The point at which the compressor will start to kick in.</p>
      <range min="-30" max="0"/>

      <name>Ratio (1:n)</name>
      <p>The gain reduction ratio used when the signal level exceeds the threshold.</p>
      <range min="1" max="20"/>

      <name>Knee radius (dB)</name>
      <p>The distance from the threshold where the knee curve starts.</p>
      <range min="1" max="10"/>

      <name>Makeup gain (dB)</name>
      <p>Controls the gain of the makeup input signal in dB's.</p>
      <range min="0" max="+24"/>



RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-27

So ok, I also forgot about this, here comes the trick, if you select the "sc4m_1916" compressor, which is mono, it will route each channel individually through the compressor.

So it is possible to compress 2.1 or even 5.1.

To change this, just replace the "sc4_1882" with "sc4m_1916" in the file "~/.config/pulse/default.pa".

I will change this in my instructions. The new command to load the module is
Code:

pactl load-module module-ladspa-sink plugin=sc4m_1916 label=sc4m control=1,1.5,401,-20,20,5,15



RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-27

thanks a lot man, this is quite a bit to wrap my head around and try to even begin to understand.
it I choose the mono compressor, does the stereo need to be unloaded first?
What remote is needed? because when I try to define keys in the eq addon I often get "not compatible" messages (right now I use a hama remote with mc functinality and build in mouse, but I have a couple diffferent including the original windows MCE controler )

as output device I have in the eq
default
build in.... hdmi.... > the one I am on
eq-1  > dropps the sound a for a few seconds before it stabilizes
co-1  > drops the sound for a while longer and it is quite loud

does your keymap is something like the keymap editor? do they interfere with each other?
a screenshot of your key mapping  or if this is a file to put somewhere would help to get an idea of a proofed setup, since I have no idea what would interfere with normal operations of kodi

on a personal note: ( falls du mal auf der grössten der Kanaren Urlaub machst fühl dich zu einigen Biers eingeladen, zumal bei uns im Dorf es noch Bier für ein Euro gibt ist es mir noch möglich grosszügig zu sein Wink
I do not want to pollute this thread too much with my beginners question, I woud prefer email or telegram if this is ok with you
I put up a link to my contact detail up here  http://c-olo.com/c.jpg  for a few hours


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-27

wow many questgions.

(2023-05-27, 12:15)azaha Wrote: it I choose the mono compressor, does the stereo need to be unloaded first?
no you can run them in parallel, however why should you.

I suggest to change to the mono one, so just run the below and you will be fine.
Code:

cp /etc/pulse/daemon.conf /etc/pulse/default.pa ~/.config/pulse/
echo -e 'load-module module-equalizer-sink sink_name=eq_1 sink_properties="device.description=EQ-1"\nload-module module-ladspa-sink sink_master=eq_1 sink_name=co_1 sink_properties="device.description=CO-1" plugin=sc4m_1916 label=sc4m control=1,1.5,401,-20,20,5,15' >> ~/.config/pulse/default.pa


(2023-05-27, 12:15)azaha Wrote: What remote is needed? because when I try to define keys in the eq addon I often get "not compatible" messages (right now I use a hama remote with mc functinality and build in mouse, but I have a couple diffferent including the original windows MCE controler )

Both should work, not sure about the error message, can you do a screenshot, please? I have the hama myself, I'll test later.

(2023-05-27, 12:15)azaha Wrote: as output device I have in the eq
default
build in.... hdmi.... > the one I am on
eq-1  > dropps the sound a for a few seconds before it stabilizes
co-1  > drops the sound for a while longer and it is quite loud
there is a small delay until the video and audio are in sync, however there should not be a long drop of sound of seconds. Not sure why that is with your system.
Probably has to do with the audio buffer. I'll think about it.

(2023-05-27, 12:15)azaha Wrote: does your keymap is something like the keymap editor? do they interfere with each other?
a screenshot of your key mapping  or if this is a file to put somewhere would help to get an idea of a proofed setup, since I have no idea what would interfere with normal operations of kodi
Well, keymap editor is very dominant, it simply deletes all other keymap files created by users or other tools, not very nice. So in this regards, they interfere with each other. Kodi developer do not allow any other keymap editor in the official repositories, maybe for security reason or because their keymap editor behaves like a dictator... I don't know.

Kodi processes the the keymap files in alphabetic order, so if you create a keymap file with keymap editor and after that learn keys with my editor, it will work.

And thanks for the invitation, maybe I will be there some time in the future.

You can create a new thread "beginners questions", so it will not only be me answering. If it relates to equalizer, I guess many people might come across the same.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-27

I can get rid of the keymap editor since i can do things in your eq editor, your button layout (Screenshot) would help - so far i just mapped the chanel up button to open the predefined eq choice. I think that can be done better but i like to get an idea how a pro is doing this.
does your sound mod works on the leia verson too? I just found out that my favorite skin what i used fot the last 10 years (transparency) is not oficially supportet in matrix.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - wastis - 2023-05-28

azaha Wrote:works on the leia verson too?
I dropped support for leia with version 2. The other stuff like the mpris also does not work with leila, there is however an addon called dbus which does the same.

I did quickly check the hama remote. I could give you a detailed reasoning, however I think this is by far to complex for someone who does not want to deal with technical details.

So here a short summary, this only applies to the hama remote control on a desktop.
  • Special Keys: Power, Explorer, Start, Volume, Volume, Mute, Close. Those keys will never arrive in Kodi as they are handled by the linux desktop
  • Media Keys: PLAY,PAUSE,NEXT,PREV,STOP,REC,FF,FR those keys are forwarded to Kodi by the MPRI-addon can be learned and used by the equalizer-addon
  • Mouse Keys: Left-Click, Right-Click, those keys are handled by Kodi and their function cannot be overwritten by the equalizer-addon. Thus the message "not compatible".
  • Info Key: This key is translated into a Right-Click mouse button by the OS.
  • Navigation Keys: Up, Down, Left, Right, OK, Enter, Back: those keys are handled by Kodi and their function will not be overwritten by the equalizer-addon.
  • Number Keys 0-9, #-Key, For whatever reason the OS adds a NUMLOCK keypress before and after the key, so three keystrokes arrive Kodi. The equalizer-addon learning feature just takes the last keystroke, which is "numlock" in this case.
  • Color Keys yellow, blue, green, red and the symbolic four keys below will be translated by the OS, however they arrive and can be used by equalizer-addon

This all is not true for a headless installation, there all keys just work.

So it is limited what you can do to get "all" keys working.

My recommendation for keys on the hama are:
PulseEqualizer - Yellow
Device - Blue (I have multiple audio devices connected to my boxes, I also use BT Inear)
Full Screen - Red
Info - Green
Play Pause - play-pause
Next - next-track
Previouse - prev-track

Show Subtitles - one of the function keys below the color keys.

This is what I use most. Full Screen for me is quite important, it hides the menu while watching a movie and I started to navigate around.

If you ask me for a recommendation on a remote, I only can tell you what some other people do.
Many people nowadays use the CEC- remote functions (using the TV's remote control to control Kodi), this only works with raspberry but not with x86 pc's. There are also USB-CEC adapter available to overcome this. I cannot tell how good they are.
I even was helping one person to set-up ALEXA to remote control Kodi, this also worked. Time changed and there a really many options.


RE: HOWTO Kodi with Equalizer on LinuxMint 20.1 - azaha - 2023-05-28

Argh, the volume in 5 step increase with added sound was driving me something someting, now I know where to look
btw this is my 10 year old hama remote https://www.amazon.de/gp/product/B000X1EL4W/
I also have this https://www.amazon.de/gp/product/B0055QKA5O as as spare if needed
and a couple free programable remotes (where I use the volume from the amplifier direct.

BUT your explanation of the Linux hijacked keys is a BIG help
the info key what was with the elecs and key mapper defined as the options key and worked well gave me as you above mentioned trouble too, so i mapped the menu funktion on the record key above

OK when there is no support for laya then I forget this idea since i am here because of your audio enhancements, that is the only thing that counts.

funny thing happened yesterday, finally happy with my sound I connected the bigger and much more expensive Infinity Primus 150 (http://www.hifi-review.com/150753-infinity-primus-150.html)
only to find out, that no matter how I do the tweaks (crossover, little or big speaker profile, double bass etc) I could not get the clear sound the
Yamaha NX-430p https://duckduckgo.com/?q=Yamaha+NX-430p+&t=ftsa&iar=images&iax=images&ia=images
Frustrated with the outcome I did not even consider trying the Infinity Beta 40 Floor standing speakers (what I considered my flagship speakers) http://www.hifi-review.com/151048-infinity-beta-40.html
A tryout with the also small but made with a heavy aluminum case sony pascal ss ms7 got me packing them back to storage.

Well when your ear is the boss it does not  matter what looks nicer or is better from the specs.

only question, would it make sense to have more eq steps between 1 to 4 khz to optimize it a bit more?
but the answeer has time, schönen Sonntag