Video seeking allows you to seek a specified position when you play video and audio content without compromising playback quality. This topic describes how to configure video seeking.
http://www.aliyun.com/test.flv?start=10. The start parameter specifies the position that you want to seek. After the server receives the request, it seeks the keyframe at the specified position and then returns the content starting from this keyframe. If no keyframe can be found at the specified position, the server seeks the last keyframe before the specified position.
- Before you configure video seeking, make sure that the origin server supports HTTP range requests. If an HTTP request contains the Range field in its header, the origin server must return a 206 partial content status message.
- The following table describes the file formats supported by video seeking and the
File format Meta information start parameter Example MP4 The meta information of a video file on the origin server must be contained in the file header and cannot be contained in the file tail. The start parameter specifies the start time in seconds. Decimals are supported to indicate milliseconds. For example, start=1.01 indicates that the video is played from 1.01 seconds. If the frame at the time position specified by the start parameter is not a keyframe, Dynamic Route for CDN (DCDN) will locate the last keyframe before that time position. The request URL
http://domain/video.mp4?start=10indicates that the video is played from the 10th second.
FLV Video files on the origin server must contain meta information. The start parameter specifies a byte. If the byte specified by the start parameter is not a keyframe, DCDN will automatically locate the last keyframe before that byte. The request URL
http://domain/video.flv?start=10indicates that a video is played from the 10th byte. If start=10 does not indicate the position of a keyframe, the video is played from the last keyframe before the 10th byte.
- Log on to the Dynamic Route for CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the target domain name and click Configure.
- In the left-side navigation pane of the specified domain, click Optimization.
- In the Drag/Drop Playback section, enable the video seeking feature.