All Products
Search
Document Center

Object Storage Service:0053-00000104

Last Updated:Apr 28, 2024

Problem description

The w parameter in a video snapshot request is invalid.

Causes

The w parameter in the request does not meet the requirements. This parameter specifies the width in pixels based on which to capture the image. The value of this parameter is an integer from 0 and the video width. If this parameter is set to 0, the height based on which to capture the image is automatically calculated. If w and h are set to 0, the width and height of the source image are used.

Examples

In the following sample request, the value of the w parameter is -800, which is not within the valid range.

GET /video.mp4?x-oss-process=video/snapshot,t_3000,f_jpg,w_-800,h_600 HTTP/1.1
Host: example-bucket.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 13 Apr 2023 03:17:58 GMT
Authorization: OSS qn6q**************:77Dv****************

Solutions

Make sure that all parameters in the video snapshot request are valid. The following example shows a valid request:

GET /video.mp4?x-oss-process=video/snapshot,t_3000,f_jpg,w_800,h_600 HTTP/1.1
Host: example-bucket.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 13 Apr 2023 03:17:58 GMT
Authorization: OSS qn6q**************:77Dv****************

References

Video snapshots