Code: Select all
* failed to open vchiq instanceCode: Select all
#!/bin/bash
echo Content-type: text/html
echo ""
echo "$(omxplayer /home/pi/test2/Movies_on_linbox/Browse\ Folders/oldies/superman_1941_512kb.mp4)"
Code: Select all
* failed to open vchiq instanceCode: Select all
#!/bin/bash
echo Content-type: text/html
echo ""
echo "$(omxplayer /home/pi/test2/Movies_on_linbox/Browse\ Folders/oldies/superman_1941_512kb.mp4)"
Code: Select all
[Sun Jan 06 06:25:21 2013] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-10 configured -- resuming normal operations
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1]
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] We trust you have received the usual lecture from the local System
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] Administrator. It usually boils down to these three things:
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1]
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] #1) Respect the privacy of others.
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] #2) Think before you type.
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] #3) With great power comes great responsibility.
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1]
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] sudo
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] :
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1] no tty present and no askpass program specified
[Sun Jan 06 12:21:37 2013] [error] [client 127.0.0.1]
[Sun Jan 06 12:22:00 2013] [error] [client 127.0.0.1] sudo
[Sun Jan 06 12:22:00 2013] [error] [client 127.0.0.1] :
[Sun Jan 06 12:22:00 2013] [error] [client 127.0.0.1] no tty present and no askpass program specified
[Sun Jan 06 12:22:00 2013] [error] [client 127.0.0.1]
Code: Select all
/dev/vchiq is not writable for httpd user
you have to run shell command:
sudo usermod -a -G video www-data
this will allow http server user which runs omxplayer access /dev/vchiq to display videoCode: Select all
sudo chgrp www-data /usr/lib/cgi-bin/test.cgiCode: Select all
#!/bin/bash
# $URL$
# $Id$
# Simple BASH script to start videos from web interface
# Put this file in /usr/lib/cgi-bin/test
# sudo chgrp www-data test
# sudo usermod -a -G video www-data
echo Content-type: text/html
echo ""
# For some weird reason, this only works if I leave the following line uncommented
echo "$USER"
#echo "`groups`"
echo "$(omxplayer -ohdmi /home/pi/Serenity-trailer.mp4)"