Statistics and monitoring playback

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
hapua64
New Cone
New Cone
Posts: 1
Joined: 16 Nov 2008 19:59

Statistics and monitoring playback

Postby hapua64 » 16 Nov 2008 20:30

Is there a way to read any of the statistics from the "Stream" tab of the "Media Information" dialog over the network?

I need a reliable way to monitor playback on a remote machine, and I thought I might be able to poll one of the stream statistics every few minutes, and raise an alarm if it were zero.

Grateful for any other monitoring ideas people might have.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Statistics and monitoring playback

Postby Jean-Baptiste Kempf » 17 Nov 2008 00:31

Yes, run the RC interface.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Lorni
Blank Cone
Blank Cone
Posts: 39
Joined: 12 Nov 2008 23:59

Re: Statistics and monitoring playback

Postby Lorni » 14 Dec 2008 00:42

For windows I parse 'netstat -n'

Here is PHP code:

Code: Select all

<?php function netstat($ipaddr,$port,$show=0,$protocol="TCP") { $shell_info=shell_exec("%SYSTEMROOT%\\system32\\netstat.exe -n"); $tmp=explode("\n",$shell_info); $count=0; for ($i=4;$i<count($tmp)-1;$i++) { $line=$tmp[$i]; ereg (" +([A-Z]+) +([0-9,.]+):([0-9]+) +([0-9,.]+):([0-9]+) +([A-Z]+)", $line, $regs); if ($regs[6]!="ESTABLISHED") continue; if ($regs[1]!=$protocol) continue; if ($ipaddr&&$regs[2]!=$ipaddr) continue; if ($port&&$regs[3]!=$port) continue; ++$count; if ($show) echo $regs[4]./*":".$regs[5].*/"<br>"; } return $count; } ?>
So if you stream to 'UDP://192.168.0.1:1234' try this:
$n=netstat('192.168.0.1',1234,0,'UDP');
or if you want to output ip-list:
$n=netstat('192.168.0.1',1234,1,'UDP');
where $n is count of listeners.
Use default TCP for http or mmsh streaming:
$n=netstat('192.168.0.1',1234);


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 74 guests