Video Seek
Background
Video seek is mainly used in VOD scenarios. It allows users to seek to a certain position in a video without affecting the playback effect.
- If video seek is configured, a user client sends a request similar to the following to the server when the user drags the progress bar during video playback:
http://www.example.com/test.flv?start=50
In this example, data starting from the 50th byte is returned to the client. If the video has been cached on a CDN PoP, the CDN PoP directly returns the data to the user.
- Video seek is valid only when Query Parameters is set to Ignore all for MP4 and FLV files. For details, see PoP Cache Rules.
- Video seek is valid only when your origin server supports range requests.
- Only MP4 and FLV videos are supported.
File Format |
Meta Information |
Start Parameter |
Example |
---|---|---|---|
MP4 |
The meta information of a video on your origin server must be contained in the file header rather than the file tail. |
The start parameter indicates a time. CDN automatically locates the key frame before the time specified by the start parameter if the specified time is not a key frame. The unit is second and decimal places are supported. For example, start=1.01 indicates that the start time is 1.01 seconds. |
http://www.example.com/test.mp4?start=50 The playback starts from the 50th second. |
FLV |
A video on your origin server must contain meta information. |
The start parameter indicates a byte. CDN automatically locates the key frame before the byte specified by the start parameter if the specified byte is not a key frame. |
http://www.example.com/test.flv?start=500 The playback starts from the 500th byte. |
Precautions
- You have configured a cache rule for FLV and MP4 files and .
Procedure
- Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- In the navigation pane, choose .
- In the domain list, click the target domain name or click Configure in the Operation column.
- Click the Video Settings tab.
- Click Edit next to Video Seek.
Figure 1 Configuring video seek
- (Optional) Enable time-based FLV seek.
Switch on Time-based FLV Seek, so FLV videos can be sought by time.
If you enable Time-based FLV Seek, it is valid only when Video Seek is enabled.
- (Optional) Configure the start and end parameters.
- By default, the start parameter is start and the end parameter is end.
- A parameter can contain up to 64 characters, including letters, digits, and underscores (_).
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.