Solved

Check if live VideoStreams are online/streaming or are offline

Posted on 2013-05-10
5
342 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Viewers will learn how to use Macros for greater control over Rack parameters in Ableton Live. Group devices into a Rack by selecting them and pressing Command-G (Ctrl-G on PC): Control-click (Right Click on PC) a parameter to access pop-up menu, …
Viewers will learn how to use LFOs to modulate the sound of their Sampler instruments. Click the Modulation tab in Sampler: Choose one (or more) of the three available LFOs, and click the respective button to turn it on: Select a waveform, an LF…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now