Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noise during playback #143

Closed
rkratky opened this issue Aug 17, 2024 · 8 comments · Fixed by #150 or #148
Closed

Noise during playback #143

rkratky opened this issue Aug 17, 2024 · 8 comments · Fixed by #150 or #148
Assignees
Labels
binary Issue related to youtui binary bug Something isn't working

Comments

@rkratky
Copy link

rkratky commented Aug 17, 2024

Really unsure about the possible cause, but playback with youtui has a faint crackling noise present in higher frequencies. I only noticed when I listened to classical music on headphones. I compared the same tracks with youtui and the YT Music web UI (various browsers), and it's only there with youtui.

I've no idea where in the chain of Rodio, cpal, Symphonia (or even elsewhere) the problem may be. Happy to test if you tell me what :)

I'm on Linux, so I expect the output is through ALSA to Pipewire.

@nick42d
Copy link
Owner

nick42d commented Aug 17, 2024

Hi there, going to be a tricky one. It's possible this is RustAudio/rodio#584. Could you please list a particular song that this was noticeable on?

@nick42d nick42d self-assigned this Aug 17, 2024
@nick42d nick42d added bug Something isn't working binary Issue related to youtui binary labels Aug 17, 2024
@nick42d
Copy link
Owner

nick42d commented Aug 17, 2024

Experimenting here with picking a higher quality audio stream, you're welcome to give it a go: https://github.com/nick42d/youtui/tree/iss143-test-audio-quality

@rkratky
Copy link
Author

rkratky commented Aug 18, 2024

Experimenting here with picking a higher quality audio stream, you're welcome to give it a go: https://github.com/nick42d/youtui/tree/iss143-test-audio-quality

That fixes it.

@nick42d
Copy link
Owner

nick42d commented Aug 18, 2024

Experimenting here with picking a higher quality audio stream, you're welcome to give it a go: https://github.com/nick42d/youtui/tree/iss143-test-audio-quality

That fixes it.

Nice one. There was a reason I initially selected low quality audio - high quality audio often caused rodio to fail to decode. However, rodio and rusty_ytdl have received some upgrades since then. I will run some tests on this before pushing.

@rkratky
Copy link
Author

rkratky commented Aug 18, 2024

Just as a reference, this is the track I used to test it in the diff. versions and in the browsers:

image

But it's clearly audible in all other tracks I tried, too. I just didn't notice over speakers before.

@rkratky
Copy link
Author

rkratky commented Aug 18, 2024

Out of curiosity, do you know what the LowestAudio actually means in terms of specs? Seems strange they even have such s*it source available...

@nick42d
Copy link
Owner

nick42d commented Aug 18, 2024

Out of curiosity, do you know what the LowestAudio actually means in terms of specs? Seems strange they even have such s*it source available...

Not off the top of my head I'm afraid, although I believe some digging around and running queries with rusty_ytdl could uncover this. https://docs.rs/rusty_ytdl/latest/rusty_ytdl/enum.VideoQuality.html

@nick42d
Copy link
Owner

nick42d commented Aug 19, 2024

This seems to be safe to implement, PR #150 will be merged if it passes CI. Note it will increase download time a little, so this would be a good future target for configuration.

nick42d added a commit that referenced this issue Aug 19, 2024
* Refactor common module
* fix: Make the channel/artist thumbnail on playlists/albums optional (#147)
* fix: Choose 'Highest' audio quality by default (#150) - resolves #143
* Increase audio quality - possibly resolves crackling
* Choose HighestAudio quality by default
* Complete marking public structs non exhaustive and implementing derives. Also, fixed two integration test issues; search videos failing due to a non-available song, and a flake issue on add/remove history
* Rename some awkward public structs, fix doctests
* Refactor common module
* Complete marking public structs non exhaustive and implementing derives. Also, fixed two integration test issues; search videos failing due to a non-available song, and a flake issue on add/remove history
* Rename some awkward public structs, fix doctests
* Fix failing test; renamed struct

BREAKING CHANGE: This is a significant breaking change, primarily due to  marking many structs non_exhaustive. This breakage now will save breakage in the future. In addition, significant refactoring between modules was undertaken to better organise the project.  Further to this, a small number of structs were renamed to better indicate their purpose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary Issue related to youtui binary bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants