Skip to main content

Creating a Channel

Let's create your first channel! Make sure you have a client set up so you can follow along with the examples below.

info

Channel creation is entirely self-service. iStreamPlanet will not stop or cleanup your channels. Every channel you create may incur billing charges, including the demo channel below. View your dashboard to see an overview of charges on your account.

Choosing a Source

Before creating a new channel, you must have a source to create it from. The source represents the incoming live video feed. First, get a list of sources that you have access to so that you can pick one:

$ restish isp list-sources

HTTP/2.0 200 OK
Content-Encoding: br
Content-Type: application/cbor

[
{
id: "stn-abc123"
name: "iStreamPlanet Demo 1"
self: "https://api.istreamplanet.com/v2/sources/stn-abc123"
}
{
id: "stn-def456"
name: "iStreamPlanet Demo 2"
self: "https://api.istreamplanet.com/v2/sources/stn-def456"
}
]

Each returned source has an id field. Pick one and we will use it to create a new channel.

Creating a Channel

Create a new channel with default settings by passing in your source at creation time. Here we assume that SOURCE_ID is the value picked above and CHANNEL_ID is the ID you want to use for the channel.

$ restish isp put-channel $CHANNEL_ID ingest.source.id: $SOURCE_ID

HTTP/2.0 201 Created
Date: Wed, 23 Dec 2020 22:07:29 GMT
Location: /v2/channels/CHANNEL_ID

Alternatively you can pass in a JSON representation of the channel you wish to create:

$ restish isp put-channel $CHANNEL_ID <input.json

Your channel will get created and immediately start encoding and publishing. You can fetch the channel to see its configuration details:

# Via the `Location` header
$ restish api.istreamplanet.com/v2/channels/CHANNEL_ID

# Via the get operation
$ restish isp get-channel $CHANNEL_ID

Keep your playback URL handy for viewing the running channel.

Viewing the Channel

You can use a tool like VLC to view your video, or paste it into the embedded video player below:

Customizing Channel Settings

TODO This section isn't finished yet!

Deleting a Channel

When finished, you can stop a channel from publishing by deleting it using either the channel's unique ID or the channel's location URI returned from creating the channel.

# If you know the ID:
$ restish isp delete-channel $CHANNEL_ID

# If you know the location:
$ restish delete api.istreamplanet.com/v2/channels/...

This covers the most basic channel workflow. Read on to find out how to perform live channel operations in the next section.