I have a raspberry pi that I'm trying to make display videos via controls on a web app. I'm using omxplayer the way described here. My PHP problem file only contains this line (modified for testing):
exec("/home/pi/master/playmovie.sh test.mp4");
referenceing the file /home/pi/master/playmovie.sh:
omxplayer -o hdmi /home/pi/Videos/$1 < /home/pi/master/cmd > /dev/null &
echo . > /home/pi/master/cmd
When I execute this php file or the command itself locally via putty everything works fine, but when I try to execute it via the web it locks up and the movie never starts.
Important:
- playmovie.sh has execute permissions
- master/cmd has 777 permissions
- writing to master/cmd and executing other scripts works fine both locally and online via php
- from php online I can execute
omxplayer -h
,ls -l /home/pi/Videos/test.mp4
,echo -n p > /home/pi/master/cmd
so it definitely recognizes those all as valid.
I feel like I'm going crazy and this is literally the last thing I need to do on this project to make it functional please help!!