Video seeking allows you to seek a specified position without compromising the playback quality when you play video and audio content. This topic describes how to configure video seeking.
Background information
http://www.aliyun.com/test.flv?start=10
. The start parameter specifies the position that you want to seek. In the example,
the specified position is the tenth byte. After the server receives the request, the
server seeks the keyframe at the specified position and then returns the content that
starts 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 header contains the Range field, the origin server must return the following status message: 206 partial content.
- The following table describes the sample URLs and the file formats that are supported
by video seeking.
Format Meta information start parameter Example MP4 The meta information about 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. The start time is measured 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 position that is specified by the start parameter is not a keyframe, Dynamic Route for CDN (DCDN) locates the last keyframe before that position. The request URL http://domain/video.mp4? start=10
indicates that the video is played from the tenth second.FLV Video files on origin servers must contain meta information. The start parameter specifies the byte. If the byte that is specified by the start parameter is not a keyframe, DCDN automatically locates the last keyframe before that byte. The request URL http: //domain/
video.flv? start=10
indicates that a video is played from the tenth byte. If the tenth byte is not a keyframe, the video is played from the last keyframe before the tenth byte.