Help Center> Media Processing Center> FAQs> Frame Capture> How Do I Extract Frames from a Video?

How Do I Extract Frames from a Video?

Frame capture extracts frames from a video based on the sampling interval and saves them as image files. You can call an API or 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. Set 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 set 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. Create a transcoding task to start transcoding.
  3. Query transcoding tasks. If a message indicating that the transcoding is successful is returned, log in to the OBS console and download the output file based on its 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. Create a snapshot task. Set output parameters and snapshot parameters to start frame capture.
  3. Query snapshot tasks. If a message indicating that frame capture is successful is returned, log in to the OBS console and download the output file based on its path. For details, see Downloading a File.