You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Media processing
Snapshot
Copy page
Download PDF
Snapshot
The snapshot feature allows you to capture a single frame from a video at a specific time and resize it to your desired dimensions. This topic introduces the parameters and provides examples of the snapshot feature.​
Billing notes​
  • Data retrieval fees will apply when extracting frames from videos stored in Infrequent Access Storage or Flashback Archive. These fees are calculated based on the size of the video frame. For more information, see Data retrievals.​
Notes​
  • For supported video formats, see the Constraints and limitations section in Overview.​
  • TOS does not save video frames by default. You can save a frame in one of two ways:​
  • Manually download the frame and save it locally.​
  • Add persistence parameters to the processing URL to save the frame to a designated bucket. For more information, see Saving processed results.​
Supported parameters​
​
Parameter​
Description​
Value​
Required​
t​
Specifies the timestamp at which the frame is extracted from the video.​
  • Range: [0, Video length]​
  • Integer-only​
  • Unit: ms​
Yes​
w​
Specifies the width of the video frame. If it is set to 0, the width is calculated automatically based on the original aspect ratio.​
  • Range: [0, Video width]​
  • Integer-only​
  • Unit: px​
No​
h​
Specifies the height of the video frame. If it is set to 0, the height is calculated automatically based on the original aspect ratio.​
tip​
If both w and h are set to 0, the output retains the original video dimensions.​
  • Range: [0, Video height]​
  • Integer-only​
  • Unit: px​
No​
m​
Specifies the snapshot mode.​
  • Default mode: If not specified, extracts the exact frame at the given timestamp.​
  • fast: Extracts the nearest keyframe before the specified timestamp.​
tip​
A keyframe is a specific frame in a video or animation that defines an important scene or state. However, due to factors like encoding, processing, or transmission, the exact timing of a keyframe may not always be perfectly precise.​
No​
f​
Specifies the output format.​
  • jpg (Default)​
  • png​
No​
ar​
Specifies whether to automatically rotate the video frame based on video metadata.​
  • auto: Rotates the video frame based on video metadata.​
  • w: Forces the video frame to rotate to a landscape orientation (width greater than height) based on video metadata.​
  • h: Forces the video frame to rotate to a portrait orientation (height > width) based on video metadata.​
No​
​
Examples​
  • Use the default mode to extract the frame at 26,000 ms. Resize the image to a width of 400 px and a height of 200 px. Set the output format to jpg. Example:​
  • Processed result:​
  • ​Image​​
  • Use the fast mode to extract the frame at 26,000 ms. Resize the image to a width of 400 px and a height of 200 px. Set the output format to jpg. Example:​
  • Processed result:​
  • ​Image​​
​
Last updated: 2026.02.04 17:11:22