I am trying to change volume. OMXPlayer is not using ALSA so it is not reacting. I am playing live radio stream and I want to change volume of it without stopping the radio. Is this possible? If yes, how?
I am not a PHP expert but I think you start the omx with a function like
proc_open inside your PHP code.
If you send
- characters to STDIN pipe gathered from proc_open call, you can control the omx sound.
- keys on the keyboard, while the terminal is focused.
Since you're not able to focus the terminal, you'll need to create a script that handles all the input for OMXPlayer.
Details and how it was done in PHP can be found here: https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=7987
Basically the concept is to create a script with runs in a loop polling a file or pipe for new data.
When new data is found, it consumes that data and executes commands to control omxplayer.
The file is written to by php code with a web page front end.
You can accomplish the controlling script by using a method similar to this github: https://github.com/KenT2/pyomxplayer/blob/master/omxchild.sh