Solved

Check if live VideoStreams are online/streaming or are offline

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Viewers will learn the basics of creating custom device Racks in Ableton Live. Place instrument(s) and effects onto a track, and select them all by holding the Shift key and clicking on the device title bars: Group them by typing Command-G (Ctrl-G…

820 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