Alibaba Cloud OSS Image Processing (IMG) can not only process existing images but also capture the frame at a specified time in a video file as an image.
- Currently, OSS can only capture frames from video files in the H.264 format.
- Captured images are not stored by default. You must manually download the captured images to the local device.
|t||Specifies the time when the image needs to be captured.||
Range: [0, video duration]
|w||Specifies the width of the captured image. If this parameter is set to 0, the width of the image is automatically calculated.||Pixel value: [0, video width]|
|h||Specifies the height of the captured image. If this parameter is set to 0, the height of the image is automatically calculated. If w and h are both set to 0, the width and height of the captured image are the same as those of the video file.||Pixel value: [0, video height]|
|m||Specifies the image capturing mode. If this parameter is not specified, the image is captured in the default mode, that is, the image at the specified time in the video is captured. If it is set as fast, the most recent key frame before the specified time is captured.||Enumerated value: fast|
|f||Specifies the format of the captured image.||Enumerated value: jpg and png|
- Capture the frame at the 7th second and output it as an image in jpg format.
- Capture the frame at the 50th second accurately and output it as an image in jpg format.