Help Center> Media Processing Center> FAQs> Frame Capture> How Do I Extract Frames from a Video?
Updated on 2023-08-25 GMT+08:00

How Do I Extract Frames from a Video?

Frame capture allows you to extract frames from a video based on the sampling interval and save them as image files. You can call an API or the transcoding SDK to extract frames from a video.

API Calling

MPC provides frame capture APIs. You can extract frames from a source video or video being transcoded.

Solution 1: Extract frames from a video being transcoded.

  1. Upload a source video to OBS. For details, see Uploading Media Files.
  2. Call the API for creating a transcoding task. Configure input, output, IDtrans_template_id, and thumbnail to start transcoding.
  3. Call the API for querying transcoding tasks. If a message indicating that the transcoding is successful is displayed, log in to the OBS console to download the output file based on its path.

Solution 2: Extract frames from a source video.

  1. Upload a source video to OBS. For details, see Uploading Media Files.
  2. Call the API for creating a snapshot task and configure input and output parameters to start frame capture.
  3. Call the API for querying snapshot tasks. If a message indicating that frame capture is successful is displayed, log in to the OBS console to download the output file based on its path.

SDK Calling

By using the transcoding SDK, you can extract frames from a source video or video being transcoded.

Solution 1: Extract frames from a video being transcoded.

  1. Upload a source video to OBS. For details, see Uploading Media Files.
  2. Configure frame capture when creating a transcoding task and start transcoding.
  3. Query the transcoding task. If a message indicating that the transcoding is successful is returned, log in to the OBS console and download snapshots based on the path. For details, see Downloading a File.

Solution 2: Extract frames from a source video.

  1. Upload a source video to OBS. For details, see Uploading Media Files.
  2. Set output parameters and frame capture parameters when creating a snapshot task and start the task.
  3. Query the snapshot task. If a message indicating that the task is successful is returned, log in to the OBS console and download snapshots based on the path. For details, see Downloading a File.

Frame Capture FAQs

more