Modifies a video resource of a production studio.

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 ModifyCasterVideoResource

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

CasterId String Yes LIVEPRODUCER_POST-cn-0pp1czt****

The ID of the production studio.

ResourceId String Yes 05ab713c-676e-49c0-96ce-cc408da1****

The ID of the video resource.

RegionId String No cn-shanghai

The ID of the region.

ResourceName String No test001

The name of the video resource.

LiveStreamUrl String No rtmp://sophon-test.aliyunlive.com/caster/4a82a3d1b7f0462ea37348366201****? auth_key=1608953344-0-0-ac8c628078541d7055a170ec59a5****

The URL of the live stream.

This parameter takes effect and is required only when the video resource is a live stream.

MaterialId String No f080575eb5f4427684fc0715159a****

The ID of the material.

VodUrl String No http://live.aliyun.com/AppName/StreamName.flv

The URL of the video-on-demand (VOD) file. This parameter takes effect only when the video resource is a video file that is not from the media library.

Note The VOD file must be in the MP4, FLV, or TS format.
BeginOffset Integer No 0

The offset of the position where the system starts to read the video resource.

This parameter takes effect only when the video resource is a video file. Unit: milliseconds.

Note A value greater than 0 indicates an offset from the first frame.
EndOffset Integer No 10000

This parameter takes effect only when the video resource is a video file. Unit: milliseconds.

  • A value greater than 0 indicates an offset from the first frame.
  • A value smaller than 0 indicates an offset from the last frame.
RepeatNum Integer No 0

The number of playback times after the first playback is complete. This parameter takes effect only when the video resource is a file. Valid values:

  • 0: indicates that the video is played only once. This is the default value.
  • -1: indicates that the video is played in loop mode.
PtsCallbackInterval Integer No 2000

The interval between presentation timestamp (PTS) callbacks. Unit: milliseconds. This parameter takes effect only when the video resource is a VOD file.

Response parameters

Parameter Type Example Description
RequestId String CF60DB6A-7FD6-426E-9288-122CC1A52FA7

The ID of the request.

CasterId String LIVEPRODUCER_POST-cn-0pp1czt****

The ID of the production studio.

ResourceId String 98461064-1c94-4dc1-85ce-94098764****

The ID of the video resource.

Examples

Sample requests

http(s)://live.aliyuncs.com/? Action=ModifyCasterVideoResource
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&ResourceId=05ab713c-676e-49c0-96ce-cc408da1****
&<Common request parameters>

Sample success responses

XML format

<ModifyCasterVideoResourceResponse>
	  <RequestId>CF60DB6A-7FD6-426E-9288-122CC1A52FA7</RequestId>
      <CasterId>LIVEPRODUCER_POST-cn-0pp1czt****</CasterId>
      <ResourceId>98461064-1c94-4dc1-85ce-94098764****</ResourceId>
</ModifyCasterVideoResourceResponse>

JSON format

{
    "RequestId": "CF60DB6A-7FD6-426E-9288-122CC1A52FA7",
    "CasterId": "LIVEPRODUCER_POST-cn-0pp1czt****",
    "ResourceId": "98461064-1c94-4dc1-85ce-94098764****"
}

Error codes

For a list of error codes, visit the API Error Center.