Answer the question
In order to leave comments, you need to log in
How to implement a background mp3 player with the ability to control it through a system of commands?
Hello everyone, I can’t write the title more precisely, the thought is this.
There is a linux server, several sound cards are installed on it, which broadcast the sound being played by a certain script using mplayer to the specified device (s).
I don't know how to implement the following:
It is required to start playing, for example, music in the background, a playlist, as, for example, it plays in any shopping centers in boutiques, or in coffee houses on a permanent basis, from morning to evening. At some point in time, the player somehow receives the command "Reduce the sound to 10%", the sound is reduced, and the other player plays the incoming signal over the sound being played by the first player. Also, the Player could receive commands what to play, such as send a playlist from the front (paths to files) and it would change them at the time of playback and start playing another list of files.
The main idea here is the task: how to control the audio player at the time of its operation, in the background, without a GUI?
I tried to find a similar implementation on nodejs, but I didn’t go through everything, maybe someone knows similar solutions?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Thanks to everyone for the tip, but in fact, I accidentally stumbled upon the use of mplayer and its management. Apparently I didn’t put the question correctly, or they just didn’t understand me, it turned out everything was just
mkfifo /tmp/control
mplayer -slave -input file=/tmp/control
and send commands to /tmp/control
Thank you all :)
Roman Kilanov , google for existing players
[ SO: Play audio ]
[ troubadour ]
[ node-sound ]
[ mplayer ]
Here's a cool thing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question