Comments (19)
Thanks @LebedevRI
I don't want to remove bs2b, I use it at work to play music through headphones.
So there are two alternatives as far as I can see, either disable loudness normalization when bs2b is checked, or submit the patch fixing bs2b to upstream and different distros.
If alexmarsev/libbs2b@5ca2d59 is the correct way of fixing it, I suggest we patch bs2b, I can submit the patch to Fedora and openSUSE and ask Arch and Debian if they can add it.
The official repository is here: https://sourceforge.net/p/bs2b/code/HEAD/tree/trunk/libbs2b/ and the last time there was any real activity was in 2009, so not much chance a new version will be released.
from strawberry.
fwiw, already submitted to FreeBSD
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275403
This will likely be committed during the weekend due to maintainer timeout (port/package policies)
from strawberry.
openSUSE: https://build.opensuse.org/request/show/1142856
Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2261991
from strawberry.
https://salsa.debian.org/debian/libbs2b/-/merge_requests/2
from strawberry.
I merged the libbs2b changes in Debian. Note that I am not familiar with related audio libraries, and I count on you to ensure the patch correctness. If the patch on libbs2b would introduce side effects, please do let people know.
from strawberry.
@LebedevRI Can you look into this?
from strawberry.
@v-fox are you able to reliably reproduce the issue?
from strawberry.
Also, can you please show a screenshot of Settings -> Backend
?
My only guess here is that somehow the strawberry
's own gstreamer pipeline
somehow ends up needing to convert from floating-point in the middle of the process...
from strawberry.
are you able to reliably reproduce the issue?
Yes, in fact, it's more aggressive than I thought. It triggers more often with less loud tracks, so I had to decrease target further to -16
dB (after initial -6
to -9
to -12
) while increasing limiter's boost. It was really bad with a quiet piano track.
Don't remember which one was it (maybe "Piano Collections NieR Gestalt & Replicant - Kainé" or "Hills of Radiant Wind") but it had a low "Integrated Loudness" of like -12 to -24.
Also, can you please show a screenshot of Settings -> Backend?
Sure but whole thing is not getting on screen.
from strawberry.
Could you please try narrowing it a bit, namely, try disabling all of the:
- Enable volume control
- Improve headphone listening <...> (bs2b)
- All of fading
Does it still reproduce with all of them disabled?
(Do fully restart the strawberry after changing settings before trying to reproduce!)
If not, does it reproduce with one specific setting enabled?
Or perhaps a combination of settings?
from strawberry.
Could you please try narrowing it a bit, namely, try disabling all of the:
I've set target to LN -6
and limiter to -4
(more like -1, considering -3 on input). The distortion became immediately apparent on "Kainé" piano track (IL=-15.85 LUFS and LR=10.67 LU; input spectrum smashes 0 dB in limiter). And you were right, disabling bs2b
and just restarting playback made it stop sounding like as if headphone wires are about to fall off.
And I would have bet on fading effects instead, since they make slight "crunching" glitch under pipewire, at least when manually pausing. But this seems to be unrelated.
from strawberry.
Aha.
I think this is working as intended:
https://salsa.debian.org/debian/libbs2b/-/blob/2cd2edd45aa0736642c9b3181731ab0d1548de0a/src/bs2b.c#L504-508
Smart, i know, right?
I would certainly suggest that you ask the upstream to stop doing that.
from strawberry.
@jonaski i'm not really sure how this can be addressed on strawberry's side.
gstreamer lists bs2b in "bad" category, and original upstream is dead.
(I could supply a patch to remove bs2b from strawberry, if that's what is preferred :) )
from strawberry.
@v-fox thank you for the report! This is indeed a very not-nice issue.
from strawberry.
@v-fox thank you for the report! This is indeed a very not-nice issue.
@LebedevRI Thanks for pointing me to the right direction.
Could simply patching out the offending code do the trick or the whole logic for bs2b is hardcoded for integers?
from strawberry.
@v-fox thank you for the report! This is indeed a very not-nice issue.
@LebedevRI Thanks for pointing me to the right direction. Could simply patching out the offending code do the trick or the whole logic for bs2b is hardcoded for integers?
I think, simply patching out the offending code (i.e. clamping) is enough,
and the actual processing is done on double
's. That being said,
theoretically such clamping might be required, but that is not likely.
Thanks @LebedevRI
I don't want to remove bs2b, I use it at work to play music through headphones.
So there are two alternatives as far as I can see, either disable loudness normalization when bs2b is checked, or submit the patch fixing bs2b to upstream and different distros.
Just to spell it out explicitly: the fact that Loudness Normalization can result in values > 1.0
(> +0 dB
/ > +0 dBFS
)
is NOT a bug, is very intentional, and the fact that there is no limiter / clamping
after Loudness Normalization is NOT a bug. The whole pipeline should never internally limit.
If alexmarsev/libbs2b@5ca2d59 is the correct way of fixing it, I suggest we patch bs2b, I can submit the patch to Fedora and openSUSE and ask Arch and Debian if they can add it.
I think that could be the best way forward,
but there's a lot of distros/packages of bs2b
:)
The official repository is here: https://sourceforge.net/p/bs2b/code/HEAD/tree/trunk/libbs2b/ and the last time there was any real activity was in 2009, so not much chance a new version will be released.
Yup. It kind-of sounds like it's time for an official fork for the project.
from strawberry.
Submitting to Debian is a bit tedious, you have to do it through the mailing-list, so I'll leave that to someone else already in the Debian system.
And I could not register an account in Arch, they have closed the registration because of spam, also better someone already in the Arch system does this.
Patch is added to macOS and Windows builds.
from strawberry.
Thanks @LebedevRI
from strawberry.
@hosiet thank you! We are reasonably sure that the patch is correct, yes.
from strawberry.
Related Issues (20)
- System icons do not load when Strawberry is compiled from source HOT 7
- Window is invisible/empty after update to Qt 6.7 HOT 6
- Flac file playing repeatedly skips once after the initial 2 seconds
- Strawberry doesn't output any audio HOT 2
- how can I help? HOT 1
- Dynamic playlist scrolling takes priority over skipping songs
- After drag'n'dropping folder with flac+cue only flac is added to queue HOT 2
- Strawberry cannot correctly display russian names from flac after drag'n'dropping .cue file to queue HOT 6
- Playlists are broken and empty after latest commits HOT 5
- Fedora 40 missing in repo and status on Rawhide builds HOT 1
- Built-in keyboard shortcuts HOT 1
- Collection view: Grouping by Genre/Artist/Album - Artist ignored for various HOT 2
- OGG file playing skips continuously after several seconds HOT 11
- Strawberry erroneously marks itself as incompatible with compatible version of mac os
- Error when playing multi-channel wavpack file: Expected framed input HOT 4
- Non-latin characters replaced with � in smart playlist names after restart
- Files cannot be played, an error occurs HOT 1
- once paused playback cannot be continued HOT 19
- Failed to play WavPack file: Could not determine type of stream HOT 6
- Some minor bugs with VLC engine HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strawberry.