Page 1 of 1

vlc - linux - php - unable to launch vlc for dvb, HELP

Posted: 15 Feb 2007 10:42
by bcaoxynaz
hi

i have a php script on apache2,

from this script i can select to stream dvb-t channels
or Dreambox channels


for dreambox channels it works OK:

running it with the exec() command.
/usr/bin/vlc /-vvv --daemon http://192.168.0.15:8585/video.m3u --sout '#transcode{vcodec=WMV2,vb=384,width=320,height=240,acodec=mpga,ab=128,channels=1,fps=25,scale=1}:duplicate{dst=std{access=http,mux=asf,url="192.168.0.35:1234"}}'


but for dvb-t channels it doesn t work:
running this with exec()

/usr/bin/vlc /-vvv --daemon dvb-t:frequency=514000000:inversion=0:bandwidth=8:code-rate-hp=2:code-rate-lp=2:modulation=64:transmission=8:guard=4:hierarchy=0 --sout '#transcode{vcodec=WMV2,vb=384,width=320,height=240,acodec=mpga,ab=128,channels=1,fps=25,scale=1}:duplicate{dst=std{access=http,mux=asf,url=192.168.0.35:1234}}'




for dvb-t it doesn t launch VLC, whats wrong ??

and if I manually do this command:
/usr/bin/vlc /-vvv --daemon dvb-t:frequency=514000000:inversion=0:bandwidth=8:code-rate-hp=2:code-rate-lp=2:modulation=64:transmission=8:guard=4:hierarchy=0 --sout '#transcode{vcodec=WMV2,vb=384,width=320,height=240,acodec=mpga,ab=128,channels=1,fps=25,scale=1}:duplicate{dst=std{access=http,mux=asf,url=192.168.0.35:1234}}'
in Konsole as a regular user, it works...
so why not from web ?


if some1 have ideas ??? on how to solve it

Posted: 15 Feb 2007 12:25
by bcaoxynaz
i hve done some tests...

from web page my exec (bla bla bla) starts vlc for DVB, but cpu usage is 0% and is not streaming...... so vlc proccess is launched by user www-data but remains at 0% cpu and not streaming...


on other way, with Konsole i can do:

su - www-data
and then
/usr/bin/vlc /-v --daemon bla bla bla bla bla bla bla bla lba = THIS ONE WORKS... = it launch vlc process and i can see that it works because proccess uses 60% of my cpu time... and i can connect to see the stream from other computer...


any ideas ? ( getting crazy )

Posted: 29 Mar 2007 09:56
by bXn
One problem may come from the fact that the user www-data
has not rights to access /dev/dvb/adaptor0 directory (DVB device)

try to change those rights.

one way to use super user commands is to add your php file
to the /etc/sudoers page like this :

Code: Select all

www-data ALL=(ALL) NOPASSWD: /usr/bin/php -f var/www/dvb/info_frontend.php
to know what is going wrong you can have a look to the error log files
of apache.



by the way here is one of my php page :

Code: Select all

<HTML> <BODY BGCOLOR=#993399 > <? /********************************************** * Informations Front EnD **********************************************/ exec('dvbsnoop -s feinfo -hideproginfo > /var/www/dvb/tempo_dvbsnoop.txt '); sleep(5); $lines = file ('/var/www/dvb/tempo_dvbsnoop.txt'); echo "<TABLE BORDER=1 BGCOLOR=#FFFFFF >"; foreach ($lines as $line_num => $line) { echo "<TR><TD>" . $line . "</TD></TR>" ; } echo "</TABLE>"; ?> <HR> <a HREF="index.php">Retour</a> </BODY> </HTML>

Posted: 14 Apr 2007 21:21
by silid
you need to add the user apache runs as (maybe www-data or apache) to the group 'video' in your /etc/groups file

this is safer than giving server admin privilages to scripts

si

Posted: 18 Apr 2007 10:26
by lokrain
The problem is discussed here: viewtopic.php?t=30993

Posted: 18 Apr 2007 11:33
by muse
The problem is discussed here: viewtopic.php?t=30993
and also here:

viewtopic.php?p=108565#108565

and here :

viewtopic.php?t=32135

... it's a very popular issue :shock: