Configure video seeking
Video seeking is a feature for on-demand video where the client sends a URL request to the server when you seek to a specific point in a video. This topic describes how to enable the video seeking feature.
File formats and parameters
For example, if a client sends a URL request for an FLV file such as www.aliyun.com/test.flv?start=10, the server returns data that starts from the keyframe preceding the 10th byte. The following table describes the supported file formats and URL formats for video seeking.
File format | Metadata | Start parameter | Example |
MP4 | The video's metadata on the origin server must be in the file header. Videos with metadata at the end of the file are not supported. | The start parameter specifies the time in seconds and supports up to three decimal places. For example, start=1.01 indicates that playback starts at 1.01 seconds.
| A URL request for |
FLV | The video on the origin server must contain metadata. | The start parameter specifies the offset in bytes. Decimals are not supported. If you specify a decimal value, the seeking module rounds it down to the nearest integer. If you enable Time-based FLV Seeking, the start and end parameters represent time in seconds. Note Byte-based seeking is suitable for precise data processing or raw video workflows, whereas time-based seeking offers a user-friendly experience by allowing jumps to a specific second.
| A URL request for |
Procedure
-
Log on to the DCDN 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 tree of the domain name, click Optimization.
-
In the Drag/Drop Playback section, turn on Drag/Drop Playback.

Handling drag-and-drop parameters
For example, when seeking by time, the default video seeking parameters are start and end. The following tables describe the processing logic for parameter values in different scenarios:
MP4 file requests
start/end value | Example | Handling Drag-and-Drop |
Invalid |
| Ignores the video seeking parameters and responds with the complete video. |
Valid |
| Drag-and-drop processing time for |
Invalid |
| Processes video seeking from |
Valid |
| Processes video seeking from |
|
| Ignores the video seeking parameters and responds with the complete video. |
|
| Drag-and-drop processing time for |
|
| Drag-and-drop processing: |
|
| Returns |
FLV file requests
start/end value | Example | Drag-and-drop handling logic |
Invalid |
| Ignores the video seeking parameters and responds with the complete video. |
Valid |
| Drag-and-drop processing: Duration for |
Invalid |
| Processes video seeking from |
Valid |
| You can process the range |
|
| Ignores the video seeking parameters and responds with the complete video. |
|
| You can drag and drop a file with a length of |
|
| Handles drag-and-drop operations for |
|
| Returns the complete video. |