Help Starting vlc stream with PHP

*nix specific usage questions
tamray
Blank Cone
Blank Cone
Posts: 18
Joined: 04 Feb 2007 15:34

Help Starting vlc stream with PHP

Postby tamray » 15 Feb 2012 18:17

I have a mythbuntu 11.10 box that I am using to stream via VLC. For whatever reason the box is not stable. VLC usually crashes somewhere through the course of the day with a segmentation fault, so I am attempting to create a php page to start vlc with a browser. I have edited /etc/sudoers, to allow www-data to start VLC.

(I kill mythtv before working with vlc)


This is what I have for a simple php page:
<?php

exec("/home/raymond/vlc-stream-dvb");

?>


I have two scripts. The first streams the /dev/video side of my HVR-1600 tuner:

#!/bin/bash

vlc -I http pvr:///dev/video0 :norm=ntsc --sout '#standard{access=http,mux=asf,dst=10.10.1.53

:8181}'

This script does work, with the following info in the apache error log:

Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")

Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")

[0x937a3ac] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to1

[0x937a3ac] main interface error: no suitable interface module

[0x9378004] main interface error: no suitable interface module

[0x92d00d4] main libvlc error: interface "globalhotkeys,none" initialization failed

[0x9378004] main interface: creating httpd


The second script (the one I really need working) looks like this:
#!/bin/bash

vlc -I dummy dvb:// :dvb-adapter=0 --sout '#standard{access=http,mux=asf,dst=10.10.1.53:8181}'


I have tried different variations with the interface, but cannot get it to work. Using the dummy interface, I get the following error in apache:

Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")

Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")

[0x99fd3ac] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to1

[0x99fd3ac] main interface error: no suitable interface module

[0x99f0d74] main interface error: no suitable interface module

[0x99530d4] main libvlc error: interface "globalhotkeys,none" initialization failed

[0x99f0d74] main interface: creating httpd

[0x9a0550c] dvb access error: Frontend type not supported for scanning

[0x99e5f74] main input error: open of `dvb://' failed: (null)

[0x99e5f74] main input error: Your input can't be opened

[0x99e5f74] main input error: VLC is unable to open the MRL 'dvb://'. Check the log for details.


Any help fixing what is broken is greatly appreciated.

Raymond

Rémi Denis-Courmont
Developer
Developer
Posts: 15335
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Help Starting vlc stream with PHP

Postby Rémi Denis-Courmont » 15 Feb 2012 18:27

The dvb:// MRL is incomplete. VLC thinks you want to do a spectrum scanning and fails.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

tamray
Blank Cone
Blank Cone
Posts: 18
Joined: 04 Feb 2007 15:34

Re: Help Starting vlc stream with PHP

Postby tamray » 15 Feb 2012 19:48

Ok. I will look into what is missing. That line does work from a shell while logged into a desktop. What changes by running it as a script?

tamray
Blank Cone
Blank Cone
Posts: 18
Joined: 04 Feb 2007 15:34

Re: Help Starting vlc stream with PHP [solved]

Postby tamray » 16 Feb 2012 15:38

Using dvb-s:// instead of dvb:// fixed the issue.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 40 guests