R
R
Roman Kilanov2020-06-25 19:46:26
Audio
Roman Kilanov, 2020-06-25 19:46:26

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

3 answer(s)
R
Roman Kilanov, 2020-07-02
@Kilanoff

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 :)

D
Dim, 2020-06-27
@Dek4nice

Roman Kilanov , google for existing players
[ SO: Play audio ]
[ troubadour ]
[ node-sound ]
[ mplayer ]

B
BiViPi, 2020-07-03
@BiViPi

5eff5422b13af386213434.pngHere's a cool thing

spoiler
Stealth Player - музыкальный проигрыватель без графического интерфейса. Вы управляете им с помощью глобальных горячих клавиш. Плеер понимает множество популярных форматов потоковой и трекерной музыки. Он также поддерживает интернет-радио и плейлисты.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question