Solved

Check if live VideoStreams are online/streaming or are offline

Posted on 2013-05-10
5
347 Views
Last Modified: 2013-06-01
Hi

What's the most reliable/efficient way to check
if streams like the following are actually streaming:

http://www.streetclip.tv/
http://www.livestream.com/mkwebtvsa
mms://stream02.gtk.hu/dance_tvd    windows media player

i'll have to check a few hundred channels daily
0
Comment
Question by:kiggsondrome
  • 3
  • 2
5 Comments
 
LVL 45

Expert Comment

by:aikimark
ID: 39159188
What development language/tool are you using?
0
 

Author Comment

by:kiggsondrome
ID: 39159557
For now preferably on windows7, vba and autoit or
if suitable any available shareware, i haven't really
searched yet maybe someone made one since i last
had a look.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39160171
This question is in the VB (classic) zone.  I asked about your development tools, since that product might not be what you are using for web development.  If this question were rezoned, it might attract the attention of a different set of subject matter experts.
0
 

Accepted Solution

by:
kiggsondrome earned 0 total points
ID: 39199546
i found this autoit bandwidth script and with modifications
it should be possible to check streaming channels


#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$aLabel = _GetNames(_GetObj())
Dim $aCheckBox[$aLabel[0] + 1][2]
Dim $aAdapter[2]

$hSelection = GUICreate("Selection", 300, $aLabel[0] * 30 + 30, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE))
If $aLabel[0] = 0 Then
    MsgBox(0, "Error", "No Adapters Found", 0, $hSelection)
    Exit
EndIf

For $i = 1 To $aLabel[0]
    $aCheckBox[$i][0] = GUICtrlCreateCheckbox($aLabel[$i], 8, $i * 20, 290)
    $aCheckBox[$i][1] = $aLabel[$i]
Next
$aCheckBox[0][0] = $aLabel[0]

$Button1 = GUICtrlCreateButton("okay", 100, $aLabel[0] * 30, 75)
GUISetState(@SW_SHOW)

While 1
    Sleep(50)
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $i1 = 1
            $bExit = 0
            For $i = 1 To $aCheckBox[0][0]
                If GUICtrlRead($aCheckBox[$i][0]) = 1 Then
                    $aAdapter[0] = $i1
                    ReDim $aAdapter[$i1 + 1]
                    $aAdapter[$i1] = $aCheckBox[$i][1]
                    $i1 += 1
                    $bExit = 1
                EndIf
            Next
            If $bExit = 1 Then
                GUIDelete($hSelection)
                ExitLoop
            Else
                MsgBox(0, "Error", "No Adapter Selected", 0, $hSelection)
            EndIf
    EndSwitch
WEnd

Opt("GUIOnEventMode", 1)
$hMonitor = GUICreate("Monitor", 150, 100, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE))
GUISetFont(12)
$Label1 = GUICtrlCreateLabel("", 8, 8, 100, 24)
$Label2 = GUICtrlCreateLabel("", 8, 23, 100, 24)
$Label3 = GUICtrlCreateLabel("", 8, 38, 100, 24)
$Label4 = GUICtrlCreateLabel("", 8, 53, 100, 24)
$label5 = GUICtrlCreateLabel("", 8, 68, 100, 24)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetState(@SW_SHOW)
$Data_now = _GetData(_GetObj(), $aAdapter)
GUICtrlSetData($Label5, Round($Data_now[0] / 073741824, 2) & "Total GB")
While 1
    $btmp= _GetData(_GetObj(), $aAdapter)
    Sleep(1000)

    $aData = _GetData(_GetObj(), $aAdapter)

    $bData = $aData[0] - $Data_now[0]
   
    $difftmp= ($aData[0]-$btmp[0])
   
    GUICtrlSetData($Label1, Round($difftmp, 2) & " Diff")
   
    GUICtrlSetData($Label2, Round($bData / 1024, 2) & " KB")

    GUICtrlSetData($Label3, Round($bData / 1048576, 2) & " MB")

    GUICtrlSetData($Label4, Round($bData / 073741824, 2) & " GB")
WEnd

Func _GetNames($colItems)
    Local $aName[2], $i = 1
    If IsObj($colItems) Then
        For $objItem In $colItems
            $aName[0] = $i
            ReDim $aName[$i + 1]
            $aName[$i] = $objItem.Name
            $i += 1
        Next
    EndIf
    Return $aName
EndFunc   ;==>_GetNames

Func _GetData($colItems, $aAdapter)
    Local $aData[2]
    If IsObj($colItems) Then
        For $objItem In $colItems
            For $i = 1 To $aAdapter[0]
                If $objItem.Name = $aAdapter[$i] Then
                    $aData[0] += $objItem.BytesReceivedPersec
                    $aData[1] += $objItem.BytesSentPersec
                EndIf
            Next
        Next
    EndIf
    Return $aData
EndFunc   ;==>_GetData

Func _GetObj()
    Local $wbemFlagReturnImmediately = 0x10, $wbemFlagForwardOnly = 0x20, $colItems = "", $strComputer = "localhost"
    $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")

    $colItems = $objWMIService.ExecQuery("SELECT BytesReceivedPersec,BytesSentPersec,Name FROM Win32_PerfRawData_Tcpip_NetworkInterface", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    Return $colItems
EndFunc   ;==>_GetObj

Func _Exit()
    Exit
EndFunc

Open in new window

0
 

Author Closing Comment

by:kiggsondrome
ID: 39212592
no other solutions
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question