Page 1 of 1

omxcontrol to control omxplayer from nodejs and over http

Posted: Sat Aug 18, 2012 10:06 am
by rikkertkoppes
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?

Re: omxcontrol to control omxplayer from nodejs and over htt

Posted: Tue Sep 18, 2012 1:12 am
by spoeken
Have you tried upstart? http://upstart.ubuntu.com/