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

Option for mplayer to write to FIFO? #3

Open
stdevel opened this issue Dec 31, 2020 · 1 comment
Open

Option for mplayer to write to FIFO? #3

stdevel opened this issue Dec 31, 2020 · 1 comment

Comments

@stdevel
Copy link
Owner

stdevel commented Dec 31, 2020

Thanks for your willing to assist!
Well I have the HA running in a docker container amd64. I think that this is what is causing the fact that I cannot play media streams through lovelace cards or when I call the media_player service. ffmpeg is installed in the official docker image, but it does nothing when called and no log errors either.

Wanted:
I simply would like to have the abilitiy to stream a radio and snapcast it to a speaker (snapclient), with the issues above, this is not working and I cannot see why.
So Far:
I have been able to take your image and plug into it a /etc/asound.conf as well as a /etc/pulse/client.conf which tells it to output to write to a pipe of the snapfifo which is in a shared /tmp - this actually works! After working around file permissions but it works for albeit a few seconds until the mpeg in the radio_api crashes due to resources (already at max).
Needed/Wanted:
An image that will be able to write to a tmp file which will be configured to be the snapfifo of snapcast server (not docker) - ideally what would be REALLY awesome would be that I call via API radio station "1" with the output of snapclient and stream... https://github.com/badaix/snapcast/blob/master/doc/json_rpc_api/v2_0_0.md shows that if your radio_api could simply take an ENV of what IP is snapcast and plug in the above on call - this might actually work. Meaning of course the user would need to know the actual client_ids of the snapclient to plug into the api call to radio_api.

  • I agree that this is not the current scope of your program, however this is what I am looking at achieving for my HA setup and this is only because I cannot get it to stream a simple mp3 and cast it to clients... If it is simply an image that will be able to output to a pipe file and not crash, that is already pretty great! I would be able to manually chose the stream and client maybe afterwards.

Thanks so much for your help and interest!

Highest regards,
Jeff

Originally posted by @ThongSong7 in #1 (comment)

@stdevel
Copy link
Owner Author

stdevel commented Dec 31, 2020

Interesting setup @ThongSong7!

Do you have an error message from mplayer? I try to figure out what exactly causes mplayer to crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant