All Products
Search
Document Center

Object Storage Service:0044-00000015

Last Updated:Apr 28, 2024

Problem description

The FragCount field in the Target node of the PutLiveChannel request is invalid.

Causes

An invalid value is specified for the FragCount field in the Target node in the XML body of the PutLiveChannel request. The FragCount field specifies the number of transport stream (TS) files included in the m3u8 file. When you set the value of Type to HLS, Object Storage Service (OSS) updates the m3u8 file each time when a TS file is generated. The maximum number of the latest TS files that can be included in the m3u8 file is specified by the FragCount parameter.

Examples

For example, you initiate 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>2</FragDuration>
        <FragCount>abc</FragCount>
    </Target>
    <Snapshot>
        <RoleName>role_for_snapshot</RoleName>
        <DestBucket>bucketdest</DestBucket>
        <NotifyTopic>notifyTopic</NotifyTopic>
        <Interval>1</Interval>
     </Snapshot>
</LiveChannelConfiguration

The error is returned for the preceding request because abc is not a valid value of the FragCount field. The FragCount field takes an integer within the [1,100] range as the value.

Solutions

Make sure that the fields in the Target node are valid. The following code provides a valid sample 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>2</FragDuration>
        <FragCount>3</FragCount>
    </Target>
    <Snapshot>
        <RoleName>role_for_snapshot</RoleName>
        <DestBucket>snapshotdest</DestBucket>
        <NotifyTopic>snapshotnotify</NotifyTopic>
        <Interval>1</Interval>
     </Snapshot>
</LiveChannelConfiguration

References