0044-00000014

Updated at:

Problem description

The FragDuration parameter in the Target node of a PutLiveChannel request is invalid.

Causes

You sent a PutLiveChannel request to create a LiveChannel. The Target node in the request body specifies the dump configuration. The error occurs because the FragDuration parameter is invalid. This parameter specifies the duration of each transport stream (TS) file in seconds. Its value must be an integer from 1 to 100. For an HLS dump, when the duration of audio and video data written to the current TS file reaches the specified FragDuration, Object Storage Service (OSS) switches to the next TS file after it receives the next keyframe.

Sample problem

For example, you sent the following request:

PUT /test-channel?live HTTP/1.1
Date: Wed, 24 Aug 2016 11:11:28 GMT
Content-Length: xxx
Host: test-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="utf-8"?>
<LiveChannelConfiguration>
    <Description />
    <Status>enabled</Status>
    <Target>
        <Type>HLS</Type>
        <FragDuration>abc</FragDuration>
        <FragCount>3</FragCount>
    </Target>
    <Snapshot>
        <RoleName>role_for_snapshot</RoleName>
        <DestBucket>bucketdest</DestBucket>
        <NotifyTopic>notifyTopic</NotifyTopic>
        <Interval>1</Interval>
     </Snapshot>
</LiveChannelConfiguration

The request fails because the value of FragDuration, abc, is not an integer from 1 to 100.

Solutions

Ensure that the parameters in the Target node of the request body are valid. For example:

PUT /test-channel?live HTTP/1.1
Date: Wed, 24 Aug 2016 11:11:28 GMT
Content-Length: xxx
Host: test-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="utf-8"?>
<LiveChannelConfiguration>
    <Description />
    <Status>enabled</Status>
    <Target>
        <Type>HLS</Type>
        <FragDuration>2</FragDuration>
        <FragCount>3</FragCount>
    </Target>
    <Snapshot>
        <RoleName>role_for_snapshot</RoleName>
        <DestBucket>snapshotdest</DestBucket>
        <NotifyTopic>snapshotnotify</NotifyTopic>
        <Interval>1</Interval>
     </Snapshot>
</LiveChannelConfiguration

References