1

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?

Thank you

1

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 + and - characters to STDIN pipe gathered from proc_open call, you can control the omx sound.

0

Use the + and - 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

  • I know about this feature, but my terminal is not focused. It's done remotely via PHP – Ondrej Vrabel Nov 20 '16 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.