Publish a demo broadcast

The Wowza™ encoder GraphQL API enables you to manage your Wowza hardware encoder and broadcasts directly via the API. GraphQL APIs are structured so that the operations mirror the responses. We recommend using the GraphiQL app, an interactive, browser-based IDE for exploring and using GraphQL APIs.

For testing purposes, Wowza Media Systems™ provides a demo stream that is being published to a demo Wowza Streaming Cloud Ultra Low Latency destination. This article describes how to find, publish, and monitor the demo broadcast with the Wowza encoder GraphQL API.

Note: The demo broadcast is intended for testing and learning purposes only.

Find the demo broadcast


First, use the following query to find the demo broadcast, Wowza Demo Broadcast, and the encoder, Wowza Demo Encoder. You'll use the broadcast and encoder ID values returned by these queries in other operations.

query allBroadcasts {
  allBroadcasts {
    id
    name
  }
}

query allEncoders {
  allEncoders {
    id
    name
    deviceId
    serial
    namespace {
      id
      name
    }
  }
}

Activate the broadcast and encoder


Use the following query to activate the broadcast and encoder. Note that this causes the encoder to subscribe to the broadcast.

  • Activate the encoder. 
    mutation setactivateBroadcastEncoders {
      activateBroadcastEncoders(broadcastId: "yourBroadcastId") {
        id
        broadcastEncoders {
          id
          encoder {
            id
            deviceId
            name
          }
        }
      }
    }
  • Set the broadcast status to live. 
    mutation setBroadcastStatusLIVE {
      setBroadcastStatus(broadcastId: "yourBroadcastId", status: LIVE) {
        id
        status
        liveAt
        previewedAt
        stoppedAt
      }
    }

After the broadcast's status changes to LIVE, you can use the following URLs to view the broadcast. Note that the demo encoder is located in Denver, Colorado and the broadcast is being delivered over the Wowza Streaming Cloud Ultra Low Latency network. The expected latency is, approximately, 2-3 seconds.

Monitor the broadcast


The Wowza encoder GraphQL API provides a variety of near real-time stream health metrics to help you ensure that your broadcasts run smoothly. The metrics are also available after the broadcast ends. For more information, see Monitor Wowza encoder broadcasts.

End the broadcast


After you finish testing the demo broadcast and exploring the near real-time monitoring data, use the setBroadcastStatus and setDeactivateBroadcastEncoders mutations to end the broadcast.

  • Set the broadcast status to stopped. 
    mutation setBroadcastStatusSTOPPED {
      setBroadcastStatus(broadcastId: "yourBroadcastId", status: STOPPED) {
        id
        status
        liveAt
        previewedAt
        stoppedAt
      }
    }
  • Deactivate the encoder. 
    mutation setdeactivateBroadcastEncoders {
      deactivateBroadcastEncoders(broadcastId: "yourBroadcastId") {
        id
      }
    }