All Products
Search
Document Center

ApsaraVideo Live:StartCaster

Last Updated:May 20, 2024

Starts a production studio.

Usage notes

You can call the CreateCaster operation to create a production studio and then call this operation to start the production studio. If the production studio does not have a PVW scene or a PGM scene, this operation creates and starts such scenes and starts audio and video processing tasks.

QPS limit

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes StartCaster

The operation that you want to perform. Set the value to StartCaster.

CasterId String Yes 80787064-1c94-4dc1-85ce-9409960a****

The ID of the production studio.

  • If the production studio was created by calling the CreateCaster operation, check the value of the response parameter CasterId to obtain the ID.
  • If the production studio was created by using the ApsaraVideo Live console, obtain the ID on the Production Studio Management page. To go to the page, log on to the ApsaraVideo Live console and click Production Studios in the left-side navigation pane.
Note You can find the ID of the production studio in the Instance Name column.

Response parameters

Parameter

Type

Example

Description

PgmSceneInfos Array of SceneInfo

The information about the PGM scenes.

SceneInfo
SceneId String b5f8c837-ceeb-424f-b30b-68e94e86****

The ID of the scene.

StreamInfos Array of StreamInfo

The stream relay URLs.

StreamInfo
OutputStreamUrl String rtmp://abclive/caster/example.net

The URL.

TranscodeConfig String lld

The transcoding configuration. Valid values:

  • lsd: standard definition
  • lld: low definition
  • lud: ultra high definition
  • lhd: high definition
VideoFormat String flv

The format. Valid values:

  • flv
  • rtmp
  • m3u8
StreamUrl String rtmp://abclive/caster/example.edu

The streaming URL of the PGM scene in the production studio. The value is not a stream relay URL.

PvwSceneInfos Array of SceneInfo

The information about the PVW scenes.

SceneInfo
SceneId String b5f8c837-ceeb-424f-b30b-68e94e86****

The ID of the scene.

StreamUrl String rtmp://abclive/caster/example.net

The streaming URL of the PVW scene in the production studio. The value is not a stream relay URL.

RequestId String 6EBD1AC4-C34D-4AE1-963E-B688A228BE31

The request ID.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=StartCaster
&CasterId=80787064-1c94-4dc1-85ce-9409960a****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<StartCasterResponse>
<RequestId>6EBD1AC4-C34D-4AE1-963E-B688A228BE31</RequestId>
<PvwSceneInfos>
    <SceneInfo>
        <SceneId>b5f8c837-ceeb-424f-b30b-68e94e86****</SceneId>
        <RtsUrl/>
        <StreamUrl>rtmp://abclive/caster/example.net</StreamUrl>
    </SceneInfo>
</PvwSceneInfos>
<PgmSceneInfos>
    <SceneInfo>
        <SceneId>b5f8c837-ceeb-424f-b30b-68e94e86****</SceneId>
        <StreamUrl>rtmp://abclive/caster/example.edu</StreamUrl>
        <StreamInfos>
            <StreamInfo>
                <OutputStreamUrl>rtmp://abclive/caster/example.net</OutputStreamUrl>
                <VideoFormat>flv</VideoFormat>
                <TranscodeConfig>lld</TranscodeConfig>
            </StreamInfo>
        </StreamInfos>
    </SceneInfo>
</PgmSceneInfos>
</StartCasterResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "StartCasterResponse" : {
    "RequestId" : "6EBD1AC4-C34D-4AE1-963E-B688A228BE31",
    "PvwSceneInfos" : {
      "SceneInfo" : {
        "SceneId" : "b5f8c837-ceeb-424f-b30b-68e94e86****",
        "RtsUrl" : "",
        "StreamUrl" : "rtmp://abclive/caster/example.net"
      }
    },
    "PgmSceneInfos" : {
      "SceneInfo" : {
        "SceneId" : "b5f8c837-ceeb-424f-b30b-68e94e86****",
        "StreamUrl" : "rtmp://abclive/caster/example.edu",
        "StreamInfos" : {
          "StreamInfo" : {
            "OutputStreamUrl" : "rtmp://abclive/caster/example.net",
            "VideoFormat" : "flv",
            "TranscodeConfig" : "lld"
          }
        }
      }
    }
  }
}

Error codes

For a list of error codes, see Service error codes.