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

phazor: pipewire sink #717

Closed
jansol opened this issue Mar 30, 2022 · 15 comments
Closed

phazor: pipewire sink #717

jansol opened this issue Mar 30, 2022 · 15 comments
Labels
Low Priority Not outright rejected, but not a priority right now.

Comments

@jansol
Copy link

jansol commented Mar 30, 2022

Pipewire seems to be the undisputed future of linux audio and while there is no acute need yet (pipewire-pulse works like a charm), mpv and mpd already have native sinks for it so tauon should probably also eventually get one. Apparently at least the one in mpv was a breeze to code, too.

I'm somewhat interested in writing this myself but most likely won't have time to even think about it in detail before summer so if someone else is interested in implementing this, by all means consider it up for grabs. I'm mostly posting this as a reminder for myself and as a tracking issue for the feature.

@Taiko2k
Copy link
Owner

Taiko2k commented Mar 30, 2022

Yeah, there's no immediate need, but native pipewire could be a nice to have. Let me know if you want me to give any pointers on where to start in the phazor source code.

If enough distros ship pipewire we could consider just dropping pulseaudio.

@Taiko2k
Copy link
Owner

Taiko2k commented Mar 30, 2022

Thing is though I used the pulseaudio "simple" API, but pipewire has no equivalent (last time I checked) so it would be a bit of work, it's not just a drop in replacement.

@Taiko2k Taiko2k added the Low Priority Not outright rejected, but not a priority right now. label Apr 16, 2022
@jansol
Copy link
Author

jansol commented Jul 12, 2022

I guess the move to miniaudio makes this obsolete, would make more sense to add pipewire support to miniaudio instead.

@PranavBhattarai
Copy link

If enough distros ship pipewire we could consider just dropping PulseAudio.

Some progress on defaults:
Ubuntu ---->> pipewire (22.10)
Debain ------>>> pipewire (soon, experimental for now)
Fedora ------->>>> pipewire (f34)
......
many other distros like EndeavourOS, System76, OpenMandrive, etc

@Taiko2k
Copy link
Owner

Taiko2k commented Aug 16, 2022

interesting. But as mentioned, this is now dependent on the upsteam project miniaudio. As pipewire-pulse seems to work just fine there's not any immediate benefit to adding native pipewire.

@PranavBhattarai
Copy link

PranavBhattarai commented Aug 17, 2022

@Taiko2k The reason I had to make the comment is that TauonMusicBox didn't couldn't play the majority of songs.
Out of 15 songs, it could only play 3 of them.
I didn't know about this app until yesterday, wanted to try it. Added the music library and tried to play some songs, but it couldn't.

Distro: Fedora 36
App installation mechanism: Flatpak

I have all non-free & free codecs related to both audio and video. I wonder what went wrong. So, I just uninstalled it.
My wild guess is:

  • Either Tauon didn't use the codec installed in the system (because of Flatpak & its sandboxing!)
  • Or, Tauon lack of Pipewire (but it doesn't make sense since 3 songs are playing)

Note: I CAN play the song fine in default apps like GNOME videos or in Rythombox.

@Taiko2k
Copy link
Owner

Taiko2k commented Aug 17, 2022

Yeah it wouldn't be a Pipewire issue I wouldn't think. Could be a codec issue.

Try run flatpak install org.freedesktop.Platform.ffmpeg-full//21.08, though, that should have installed automatically. Otherwise can tell what codecs you have that are and aren't working, or it there seems to be any other pattern?

@PranavBhattarai
Copy link

FFmpeg is already installed as you can see in the part of the log below:

Which do you want to use (0 to abort)? [0-6]: 6
Skipping: org.freedesktop.Platform.ffmpeg-full/x86_64/21.08 is already installed

Except for 21, 63 & 7 whose first initials are blue in color, only those songs are playable; as you can see below:
image

Otherwise can tell what codecs you have

All of them, a lot of them as you can see below:
image

@Taiko2k
Copy link
Owner

Taiko2k commented Aug 17, 2022

Hmm its not a codec issue, since those tracks don't have metadata scanned, and Tauons metadata scanning is independent of codec support.

Try run Tauon from terminal flatpak run com.github.taiko2k.tauonmb. Could you tell me what error, if any, it prints when you attempt to play a track that doesn't work?

@PranavBhattarai
Copy link

@Taiko2k

 ⟹  flatpak run com.github.taiko2k.tauonmb
Tauon Music Box v7.3.2
Copyright 2015-2022 Taiko2k [email protected]

Window size: [1120, 600]
Detected running as Flatpak
Installed as Flatpak
User files location: /home/pranav/.var/app/com.github.taiko2k.tauonmb/data/TauonMusicBox
Found XDG-Downloads: /home/pranav/Downloads
Found XDG-Music: /home/pranav/Music
Install directory: /app/bin
Using crash workaround for gdk crash
Database loaded in 0.001 seconds.
Copy tray icons to data directory...
Start controller server
Start PHAzOR backend...
Using SDL version: 2.0.16
Applying theme: Neon Love
pa: ERROR, encoding format not supported!
ph: Load file failed
pa: ERROR, encoding format not supported!
ph: Load file failed
Start PHAzOR backend...
pa: ERROR, encoding format not supported!
ph: Load file failed
ph: Using samplerate 48000hz --------------------------->> I selected the song which the player can play
pa: ERROR, encoding format not supported!
ph: Load file failed
^Zfish: Job 1, 'flatpak run com.github.taiko2k.…' has stopped

@Taiko2k
Copy link
Owner

Taiko2k commented Aug 17, 2022

Interesting, those must be rare mp3s. At this point I would need to have one of those files on hand for testing in order to fix compatibility, if you're willing to upload/send me one.

Though, since the tags aren't showing, I'm assuming something must be very strange about those flies.

@PranavBhattarai
Copy link

PranavBhattarai commented Aug 18, 2022

@Taiko2k Ok, I have compressed an audio/song named "Rhythm of Shiva", and have attached it here.

image

Rhythm of Shiva - Armonian.zip

As a side note, I use Telegram bots Spotube to download audio/songs in 320Kbps. There are also some bots to download Flac audio (which I don't prefer because of its massive size.

@Taiko2k
Copy link
Owner

Taiko2k commented Aug 18, 2022

Right okay found and committed a fix for the issue.

The issue is those aren't actually MP3's, they're DASH MP4's. Tauon didn't recognise its file signature and couldn't fall back to file extension to guess an appropriate codec to use. By now adding signature detection for DASH, these will now play even with an incorrect file extension.

@PranavBhattarai
Copy link

PranavBhattarai commented Aug 18, 2022

Isn't it weird a song downloaded in "DASH MP4" codec (something that I have never heard of), but just renamed into .mp3? Doesn't make sense!

WT... 😅😅

@jansol
Copy link
Author

jansol commented Jun 20, 2023

Closing this for now since it's obsolete and to get it out of my open issues list.

@jansol jansol closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low Priority Not outright rejected, but not a priority right now.
Projects
None yet
Development

No branches or pull requests

3 participants