lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.59k stars 672 forks source link

`opusEncodingQuality` and `resamplingQuality` parameters have no noticeable effect #1109

Closed BENx2115 closed 3 weeks ago

BENx2115 commented 3 weeks ago

Change request

When adjusting the parameters opusEncodingQuality and resamplingQuality, no change in audio quality or performance is noticeable. The following setup was used:

  1. Configuration:
  1. Expected behavior: Lower quality should improve performance and reduce audio quality, especially with lower values ​​for opusEncodingQuality and resamplingQuality.

  2. Actual behavior: Audio quality and performance remained constant regardless of the value set for opusEncodingQuality and resamplingQuality.

Relevance

This issue is relevant to the Lavalink community, as many users expect performance optimizations through parameters such as opusEncodingQuality and resamplingQuality to run Lavalink more efficiently on servers with limited resources. If the parameters work as documented, they can help save resources and improve the user experience, especially on large servers or bots with high user traffic.

Could this be a plugin instead?

-

Checklist

topi314 commented 3 weeks ago

what track did you play to try this?

devoxin commented 3 weeks ago

Those settings only take effect when transcoding is involved. If you're playing from sources whose input audio codec is opus (so youtube, soundcloud and possibly HTTP tracks), then they won't have any effect unless you force transcoding via volume or filter application.

Anyway, there is nothing to be fixed or changed here. The opus encoder setting is applied to the native Opus library so it's up to that what it does with the value you give it.

Similarly, with resampling quality, this will apply to the native resampling library (libsamplerate). Outside of native method calls, we have very little control over what we can do with audio configurations.