Results 1 to 3 of 3

Thread: Need to show status of live stream on website

  1. #1

    Default Need to show status of live stream on website

    Does anyone know how I can show the status of a live stream on a website? Currently when you go to your website and click Watch live, you get a player box that just shows a spinner and nothing shows when there is not a live broadcast. I would like to detect the status of a live stream and put up a graphic or something to show it is not on. I am on a Windows box. Is there a way just do do an http call or something to determine this?



  2. #2
    Join Date
    Dec 2007


    Hi Chris,

    This example returns all published live stream names, and can be modified to check one stream

    package test;
    import java.util.Iterator;
    import java.util.List;
    import com.wowza.wms.amf.*;
    import com.wowza.wms.client.*;
    import com.wowza.wms.module.*;
    import com.wowza.wms.request.*;
    public class ModuleGetLiveStreams extends ModuleBase {
    	public void getLiveStreams(IClient client, RequestFunction function,
    			AMFDataList params) {
    		AMFDataObj streams = new AMFDataObj();
    		List<String> list = client.getAppInstance().getPublishStreamNames();
    		Iterator<String> iter = list.iterator();
    		int i=0;
    		while (iter.hasNext())
    			streams.put("stream_" + i++,;
    		sendResult(client, params, streams); 
    AS3 client-side:

    var clientObj:Object = new Object();
    clientObj.getLiveStreams = function(streams:Object):void
    for (var streamName:String in data)
    netconnection.client = clientObj;

  3. #3


    If like me you can't make heads nor tails of the post above, I found a kind of workaround using PHP. If you have enabled cupertino streaming, you can read the contents of the generated .m3u8 with file_get_contents()

    Then, you can see some differences if the stream is actually active or not. I'm not sure it will be 100% the same for everyone, but in my case, an active stream will show resolution information, while a "dead" one will not. So, this is what I use:

    		if (stristr(file_get_contents($streamurl), 'RESOLUTION')) {
    			$status = 'active';
    		} else {
    			$status = 'inactive';
    The problem with this approach, it takes about 10 seconds to get a result. So if you have a bunch of channels and want to check them all at once, you'll probably run into PHP timeout issues.

    And yes, I know it's pretty nasty, and may not work for everyone, but it's the most direct way I could find for doing this

Similar Threads

  1. show live rtmp stream in smart tv
    By mortez28 in forum General Forum
    Replies: 7
    Last Post: 07-07-2013, 08:56 AM
  2. Creating API - Retrieve status of single live stream and all live streams
    By shadowprotocol in forum Live Streaming and Encoder Discussion
    Replies: 5
    Last Post: 12-06-2011, 08:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts