VLC Command line Interface

*nix specific usage questions
seemantshankar
Blank Cone
Blank Cone
Posts: 22
Joined: 13 Aug 2013 08:27

VLC Command line Interface

Postby seemantshankar » 26 Aug 2013 16:10

Hi,

I'm trying to invoke VLC through a PHP file so it can stream out a video to a port that the browser will be listening to.
In the PHP file, i have:

Code: Select all

echo shell_exec("video.sh");
In sh file, i have:

Code: Select all

#! /bin/sh vlc videofile.ts
When i access the PHP file from the browser, this is the message i get on the browser:
"VLC media player 2.2.0-git Weatherwax Command Line Interface initialized. Type `help' for help. > Shutting down"

But when i call video.sh file directly, it opens a VLC instance and also starts streaming the video perfectly.
I basically want VLC to stream a video when called from a webpage.

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

Re: VLC Command line Interface

Postby Rémi Denis-Courmont » 26 Aug 2013 17:11

VLC cannot find the X11 server. PHP must run as the user, and the DISPLAY environment variable must be set correctly.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

seemantshankar
Blank Cone
Blank Cone
Posts: 22
Joined: 13 Aug 2013 08:27

Re: VLC Command line Interface

Postby seemantshankar » 29 Aug 2013 17:00

Thank you Remi. What if I am using VLC on a headless server? I have installed the noX version of VLC. I assume this should not look for the X11 server in this case.


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

Who is online

Users browsing this forum: No registered users and 34 guests