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

Package Request: Pianobar #1712

Closed
vredesbyyrd opened this issue Oct 25, 2017 · 33 comments
Closed

Package Request: Pianobar #1712

vredesbyyrd opened this issue Oct 25, 2017 · 33 comments
Labels
package request A new package was requested

Comments

@vredesbyyrd
Copy link

vredesbyyrd commented Oct 25, 2017

Pianobar, a console based Pandora player. It would be great to ditch the pandora app and use the awesome pianobar cli instead. I was going to try and compile for termux myself, but the more i dig the more i realize im probably in over my head.

https://github.com/PromyLOPh/pianobar
https://6xq.net/pianobar/

@fornwall fornwall added the package request A new package was requested label Oct 28, 2017
@SDRausty

This comment was marked as spam.

@vredesbyyrd
Copy link
Author

Quite fascinating. Arch on my android phone... arch is my daily driver so to learn of this is pretty cool. I was unaware you could install an entire environment like that, so thank you for enlightening me! When I am finished with work tonight i will definitely be looking into this. Thanks again for the tutorial and links.

@iamdarkmatter
Copy link

It states cant open audio device on both ubuntu and arch chroot. I would like to be able to at least<send audio to bkuetooth somehow. I have hrard of interest in paralel to bluetooth. It seems like the issue is that without rooted access the OS cant access hardware. Any help would be greatly appreciated.

@edward-p
Copy link
Contributor

edward-p commented Apr 28, 2018

@iamlord Pulseaudio is now available on termux, I tried played audio from pianobar inside Termux Arch over module-native-protocol-tcp. It works but with low performance. The audio can't even be played at real time due to the low performance. Maybe we need port it by using other audio playbacks.

@iamdarkmatter
Copy link

I am impressed you got that far. I had a similar issue with a debian vm where it played but it was, oh so, choppy. It would be nice to be able to convert the python to a native ver for android.

@tcaddy
Copy link

tcaddy commented Jul 10, 2018

I tried to make pianobar from source. Every development package is available except for libao. When I try to compile libao, it won't make the plugin for pulse audio.

Pianobar will run, but it cannot output to an audio device.

More details here: PromyLOPh/pianobar#664


Update: Pianobar will compile and play in Termux. The playback is pretty smooth, but there are a couple clips every minute or so.

@edward-p
Copy link
Contributor

Done.
Add packages: pianobar, libao #2641
The sound is much better than using module-native-protocol-tcp, which I did before, but still gets randomly choppy, I think it's a problem with pulseaudio.

@vredesbyyrd
Copy link
Author

vredesbyyrd commented Aug 14, 2018

@edward-p

Thanks for the info. I remember when I first posted about this I tired compiling libao but could not get it to build, or something along those lines. Although It sounds like I will have to revisit this now :) Cheers.

@edward-p
Copy link
Contributor

edward-p commented Aug 15, 2018

@vredesbyyrd Both of libao and pianobar patched, I reopened a pull request here. Check if the choppy sound issues fixed.

@iamdarkmatter
Copy link

Could we get a scratch brew recipe, or a termux pianobar package? I don't see libao.

@edward-p
Copy link
Contributor

@iamlord
It will be available when my pull request merged. You can build yourself if you can't wait.

@iamdarkmatter
Copy link

I've had issues installing from source. When running arch or ubuntu I can install it but it can't access my sound card. I can't use debian packages with dpkg because they do not have aarch64. I am going to ask them to create some. I think there may be a way to change the hardware ver in the source code.

@edward-p
Copy link
Contributor

edward-p commented Oct 16, 2018

Since my pull request is still pending, I built these for you. (you can fix missing dependencies from the source)

libao_pianobar_debs_aarch64.tar.gz

USE NON-OFFICIAL BUILT PACKAGES AT YOUR OWN RISK!

@iamdarkmatter
Copy link

Cool. I'm excited to try it out. I was looking at alien to convert some rpms but it won't let me do it on different hardware it seems.

@iamdarkmatter
Copy link

I just tried it out. Your amazing ed! This is really great work. Perhaps you could walk me through how you acomplished this. I have been trying for a while. Did you have to do some form of compiling or script editing? Also any chance at an English translation of your blog?

@edward-p
Copy link
Contributor

edward-p commented Oct 17, 2018

Actually, my blog doesn't mention that. You can see all my changes for termux-packages here. I just added libao and pianobar by writing build.sh for them and do some patches to fix some issues in termux environment, which is already merged into the upstream pianobar tree, you can track it here and PromyLOPh/pianobar#664
To build termux-packages yourself, you need to see the readme file of this repository.

@iamdarkmatter
Copy link

Works pretty good. Sometimes it stops recognizing what sound device it is playing to and you have to force stop the APP. It does not recognize a received phone call and keeps playing on the phone and you have to pause it. Really great work!

@wokawoka
Copy link

Thanks for the 64bit pianobar debs.
Would it be possible for someone to share the 32bit ones? I've tried to compiled them but I don't have a suitable machine to do so at the moment. Many thanks

@edward-p
Copy link
Contributor

edward-p commented Mar 1, 2019

Here you go:
prebuild_debs_arm_20190214.zip

For aarch64:
prebuild_debs_aarch64_20190214.zip

@wokawoka
Copy link

wokawoka commented Mar 1, 2019

works supergreat! Many thanks!

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

@edward-p sorry for hijacking the thread but I have been happily listening to pianobar on my phone for 3 days but tonight I broke the magic.
I don't know if it's because I updated termux from f-droid or because I also made an apt-get update / upgrade, but unfortunately now pianobar can't play a single note anymore. It regularly connects and download the playlist, fetch the song and never start it.
At a certain point I've read the "Cannot open audio device" error of issue #664.
I've tried to remove/reinstall the packages that you provided with no luck. Any idea about how I could fix it? It was too great

@edward-p
Copy link
Contributor

edward-p commented Mar 4, 2019

@wokawoka
I think it's a pulseaudio issue.
Try killall -9 pulseaudio before running pianobar

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

thanks for replying back so quickly!
unfortunately killing pulseaudio is not solving the issue.
I even rebooted the phone, pianobar connects to pandora, receives the playlist and the first song title and lenght but never start playing it :((

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

@edward-p yes, something is wrong with pulseaudio. It's like termux is not running it by default in background anymore.
As soon as I start logging with pulseaudio -vvv --daemonize=no &> ~/pulse.log pianobar starts playing again.
Do you still need the log file? Any hint on how to make pulseaudio start by default again?
Thank you very much again!

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

or, if pulseadio should be invoked and started by pianobar, that doesn't happen anymore.
If I try to run pulseadio by itself without any parameter I get

$ pulseaudio
W: [pulseaudio] core.c: Failed to allocate shared posix-shm memory pool. Falling back to a normal memory pool.

@edward-p
Copy link
Contributor

edward-p commented Mar 4, 2019

Pulseadio should be invoked and started by pianobar automatically. I found out that cmus also has the same issue.

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

yes, I've read that afterwards, it seems that pianobar invoke pulseaudio because after launching pianobar I can see the pulseaudio process alive and I can kill it, but pianobar somehow can't start playing.
But if I run pianobar after having run pulseaudio -vvv --daemonize=no in a parallel termux session pianobar just works, whereas whenever I run just pulseaudio I receive the error
W: [pulseaudio] pid.c: Stale PID file, overwriting. W: [pulseaudio] core.c: Failed to allocate shared posix-shm memory pool. Falling back to a normal memory pool.

@edward-p
Copy link
Contributor

edward-p commented Mar 4, 2019

This is not an error, just a warning. It's safe to ignore it. There might be other issues that cause this.

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

ok, you are right. And I've just checked that if I just run pulseaudio in a session and then I start pianobar in another, it indeed starts playing the music.

What I can't understand is if pianobar is no more able to invoke pulseaudio, then why I can see the pulseaudio process spawning when I launch pianobar?
and, also, why it did work previously and now I need to launch pulseaudio manually. Was this problem triggered by updating termux from f-droid or by doing an apt-get upgrade/update?

Anyway, at least now I know how to avoid the problem by manually starting pulseaudio. Thank you again!

@edward-p
Copy link
Contributor

edward-p commented Mar 4, 2019

Most likely by apt-get upgrade/update, cmus is also a victim of the new pulseaudio. This may be fixed in new pulseaudio builds in the future, if the maintainer of pulseaudio noticed that.

@wokawoka
Copy link

wokawoka commented Mar 4, 2019

alright, now everything is much more clear.
Thank you again!

@wokawoka
Copy link

As a follow up a new apt-get upgrade/update updated pulseaudio and fixed the problem.
Thanks again for pointing me in the right ddirection

@ghost
Copy link

ghost commented Sep 23, 2019

#2744 is merged now. Closing.

@ghost ghost closed this as completed Sep 23, 2019
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package request A new package was requested
Projects
None yet
Development

No branches or pull requests

7 participants