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

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
bcaoxynaz
New Cone
New Cone
Posts: 2
Joined: 15 Feb 2007 10:26

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

Postby bcaoxynaz » 15 Feb 2007 10:42

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

bcaoxynaz
New Cone
New Cone
Posts: 2
Joined: 15 Feb 2007 10:26

Postby bcaoxynaz » 15 Feb 2007 12:25

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 )

bXn
Blank Cone
Blank Cone
Posts: 46
Joined: 08 Jun 2005 09:14

Postby bXn » 29 Mar 2007 09:56

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>
Image
Image

silid
New Cone
New Cone
Posts: 8
Joined: 14 Apr 2007 21:16

Postby silid » 14 Apr 2007 21:21

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

lokrain
New Cone
New Cone
Posts: 6
Joined: 09 Feb 2007 17:09

Postby lokrain » 18 Apr 2007 10:26

The problem is discussed here: viewtopic.php?t=30993

muse
Blank Cone
Blank Cone
Posts: 30
Joined: 18 Jul 2006 10:31
VLC version: 0.86c
Operating System: Linux
Location: Italy
Contact:

Postby muse » 18 Apr 2007 11:33

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:
The only winning move is not to play


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 3 guests