pyradio: Connection fails with mpv, but works fine with mplayer
OS: Raspberry Pi OS lite (latest, on a pi zero w)
Pyradio v0.8.9.16
All dependencies installed that you included in your PR ( https://github.com/taoteh1221/Bluetooth_Internet_Radio/pull/2 ), using that script.
If I run pyradio, it says its using mpv, additionally which mpv tells me the binary exists OK on the system. But pyradio says connecting to..., and then it says connection failed when using mpv.
If I remove mpv from the system, and install mplayer instead, pyradio works OK, everything plays as expected, no problems.
Additionally (before un-installing mpv with apt), when I was in pyradio, I hit the c key, unchecked mpv checkbox, hit the s key, closed and restarted pyradio, but mpv was still selected with a checkmark when I opened the config window?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23
Ok. Thanks for the PR and insight, it was very helpful! š Most people may use a more powerful pi, the zero model is the weakest chipsetā¦maybe why you never heard of mpv crashing before. Take care, thanks again! š
The only reason I can think of is that maybe this particular board is not strong enough to handle constantly opening and closing pipes⦠IDKā¦
Iāve had other people asking about rasberry and
mpv(facing problems with the timeout value), but never anything like crashes and suchā¦Anyway, I think Iāll be closing this issue now, feel free to contact me if anything else pops up š
I am curious as to why the issue, but yes since mplayer ājust worksā on this tiny device, then it should be used instead.
Ok, no worries I appreciate your help! š I was just giving you some feedback to help with pyradio UX on raspberry pi devices. I do not think there is anyway you could have known a tiny computer like this would not run mpv well: https://www.raspberrypi.com/products/raspberry-pi-zero/
pyradio does run very well with mplayer on the raspberry pi zero though, I have been using it that way for weeks. š
Yeah, I updated the comment, after you read it (it seems)ā¦
Hi again @taoteh1221
No, I think itās not worth itā¦
I am sorry I lead you astray on this oneā¦
It seems you should dump
mpvalltogether, and stick tomplayer, since it does not cause you problems. So, I would suggest reverting everything related tompvto what it was before I gave you my āwiseā š¢ advice.Just keep the stuff about
python 3thoughā¦As for the users of your project, let them deal with all this heartache (if they feel they want to use
mpv), maybe display a note on it through your script.The thing is that
mpvuses pipes to communicate withpyradio, so, I donāt know, maybe some other board can handle it better, but with what youāve been facing, itās a deal breaker, IMHO.So, yes, go with
mplayerā¦@s-n-g I just realized that mpv crashes a raspberry pi zero (leaving it completely unresponsive) after running for a few hours. This happened a couple times in a row. mplayer in pyradio does not crash the device though (I have run it all day for weeks without a problem). So here is some logic you could port to python for raspi devices: https://github.com/taoteh1221/Bluetooth_Internet_Radio/blob/main/bt-radio-setup.bash#L1169
raspi-config is a part of all āRaspberry Pi OSā distro versions: https://www.raspberrypi.com/documentation/computers/configuration.html#:~:text=The raspi-config Tool,-Edit this on GitHub
As for alternative distros that run on a raspberrypi, I donāt know how easily you could tell.
š https://github.com/taoteh1221/Bluetooth_Internet_Radio/blob/main/bt-radio-setup.bash#L1151
This is great! Is this the case for every distro? Please keep in mind I know absolutely nothing about the Raspberry world š
And default timeout to 20:
sed -i 's/connection_timeout = .*/connection_timeout = 20/g' ~/.config/pyradio/configšThanks for the info. I fixed mpv default volume to 100 everytime my script runs pyradio:
sed -i 's/volume=.*/volume=100/g' ~/.config/mpv/mpv.conf