rikkertkoppes
Posts: 2
Joined: Sat Nov 19, 2011 9:47 am

omxcontrol to control omxplayer from nodejs and over http

Sat Aug 18, 2012 10:06 am

I have created omxcontrol to be able to control omxplayer from nodejs. It also exposes an http api:

https://github.com/rikkertkoppes/omxcontrol

All works perfectly, but I have one problem remaining. I am not sure where it lies, so maybe you can help me out

omxcontrol works by creating a pipe and sending control characters over that pipe, as discussed here: http://www.raspberrypi.org/phpBB3/viewt ... 484#p98484

Code: Select all

mkfifo /tmp/cmd
omxplayer -ohdmi mymedia.avi < /tmp/cmd
echo -n . > /tmp/cmd
echo -n p > /tmp/cmd
echo -n q > /tmp/cmd
this works when I start a server manually (node server.js)
it also works well when I start a server using forever (forever start server.js)

however, when I automatically start the server using forever by adding a line in /home/pi/.config/lxsession/LXDE/autostart playback does not work

Any ideas? Is there something different when I start a service from autostart? Is it something with forever or something with named pipes?


Return to “Media centres”