start camera stream from web page
Posted: Sun Jun 09, 2013 11:24 am
Hi all
I would like to start a pi camera stream via a webpage and then view the stream via VLC but seem to have run into a permissions issue, I think.
So far I have reused this code to start the stream:
It works fine from the SSH command line as user pi, and from a inside shell script started from the command line, and from a php script which calls the shell script, again from the command line as user pi.
The problem arises when I try to run the php script from /var/www. Other scripts work fine from the directory, but after some digging around it seems that VLC will not run as root due a to restriction put in place by the developers for security issues, and also it seems, as www-data.
Can anyone figure out how I could resolve this conundrum, please?
Thanks.
I would like to start a pi camera stream via a webpage and then view the stream via VLC but seem to have run into a permissions issue, I think.
So far I have reused this code to start the stream:
Code: Select all
raspivid -o - -t 999991 -hf -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
The problem arises when I try to run the php script from /var/www. Other scripts work fine from the directory, but after some digging around it seems that VLC will not run as root due a to restriction put in place by the developers for security issues, and also it seems, as www-data.
Can anyone figure out how I could resolve this conundrum, please?
Thanks.