You can use FIFO to send keystrokes to omxplayer.
We will show you a basic example of how you do this.
In the shell (terminal 1),
mkfifo /path/to/dir/fifo omxplayer /path/to/movie/dir/movie.ext < /path/to/dir/fifo
after executing these commands, terminal 1 will hold.
Now in terminal 2
echo -n . > /path/to/dir/fifo
Now it will start playing.
This was a basic example. You can create a php file to write to a fifo file. This way you can send commands.
p pauses
q will stop
also, if you use non-letter commands (for example, the up arrow and the down arrow), you must send the correct key code.
Hope this helps.
source share