Determine stopped video

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
yogeshsarda
Blank Cone
Blank Cone
Posts: 17
Joined: 20 Dec 2005 12:04

Determine stopped video

Postby yogeshsarda » 19 Jan 2006 05:50

When the VLC stops receiving video live stream, I want to get some kind of notification.

I tried "Playing" property but it always returns true after calling Play() (even if video is not playing)

Is there any other way to know that video stopped for some reason, like video finished, network problem...

I appreciate your responses. Thanks.

Benj

Postby Benj » 24 Jan 2006 22:01

I found recently an other way. My vlc server streaming is running on Linux. So with a php code, you can check the process of eatch program:

$commande = "ps auxf";
$result = shell_exec($commande);
$result = explode("\n",$result);

And finaly with the array $result, you can count the number of process (number of line) where you found VLC. That's works for the multiple broadcast too. But this time you search the IP:port for exemple.
Anyway,
if VLC is not running, you have 0
if VLC is running and wrong, you have 7 process on linux
if VLC is running well, you have 10 process and 2 more porcess by streaming output. I mean, if you have 3 guys connected, you have 10+3x2 = 16 process.

It is possible to have more line or less if you add video filters or multiple output. But whatever, I use this for check my server and it works pretty well.
Have fun :-)


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 5 guests