Problem: PHP starting VLC using proc_open()
Posted: 09 Feb 2007 17:33
1. PHP Code to start a stream.
2. Let run PS program
3. Let's check vlc file permissions:
-rwsrwsrwx 1 root 1187080 Oct 7 03:03 /usr/bin/vlc
I have made vlc +s so I can access the dvb-s card. ( Error if not +s ).
4. Ok. We have no stream now!
5. Sounds stupid but let's run the command shown in (2.) which we got from starting as we call the php, and using ps program.
6. I paste exactly the same not working line as process 14322 on a shell.
7. Run it.
8. WTF!? IT IS STREAMING CORRECTLY!?
Do you know any problems with the vlc syntax and proc_open function in php? I mean with symbols like ' or "
Thanks in advance
Code: Select all
$path = "vlc -vvv --color --ttl 12 --ts-es-id-pid --programs=7,12 dvb: --dvb-frequency=11596000 --dvb-srate=28800000 --dvb-voltage=13 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=standard{dst=239.255.12.42,port=1239}, select=program=7,dst=standard{dst=239.255.12.43,port=1244}, select=program=12}' -d";
$process = proc_open( $path, $this->descriptorspec, this->pipes, '/var/www/html', NULL );
if( is_resource( $process ) )
{
// We get in here so everything must be fine but!
Interesting 2 processes started. 14322 by root and 14323 by apache.14322 ? S 0:00 vlc -vvv --color --ttl 12 --ts-es-id-pid --programs=7,12 dvb: --dvb-frequency=11596000 --dvb-srate=28800000 --dvb-voltage=13 --sout-standard-access=udp --sout-standard-mux=ts --sout #duplicate{dst=standard{dst=239.255.12.42,port=1239}, select=program=7,dst=standard{dst=239.255.12.43,port=1244}, select=program=12} -d
14323 ? Ssl 0:00 vlc -vvv --color --ttl 12 --ts-es-id-pid --programs=7,12 dvb: --dvb-frequency=11596000 --dvb-srate=28800000 --dvb-voltage=13 --sout-standard-access=udp --sout-standard-mux=ts --sout #duplicate{dst=standard{dst=239.255.12.42,port=1239}, select=program=7,dst=standard{dst=239.255.12.43,port=1244}, select=program=12} -d
3. Let's check vlc file permissions:
-rwsrwsrwx 1 root 1187080 Oct 7 03:03 /usr/bin/vlc
I have made vlc +s so I can access the dvb-s card. ( Error if not +s ).
4. Ok. We have no stream now!
5. Sounds stupid but let's run the command shown in (2.) which we got from starting as we call the php, and using ps program.
6. I paste exactly the same not working line as process 14322 on a shell.
7. Run it.
8. WTF!? IT IS STREAMING CORRECTLY!?
Do you know any problems with the vlc syntax and proc_open function in php? I mean with symbols like ' or "
Thanks in advance