Solved

Check if live VideoStreams are online/streaming or are offline

Posted on 2013-05-10
5
333 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
Comment Utility
What development language/tool are you using?
0
 

Author Comment

by:kiggsondrome
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
no other solutions
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This video will demonstrate how to customize windows, tools, and control bars, and save them as screen sets. Open and resize windows: Customize the toolbar: Customize the control bar: Customize your tool selections: Your screen set is alread…
Viewers will learn how to turn a Live Set into a compressed Live Pack file, and how to install Live Packs. Make: File > Collect All And Save: File > Manage Files: Click Manage Project: Click Create Pack: Select save location: Install: Doub…

762 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

9 Experts available now in Live!

Get 1:1 Help Now