Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.
- What's New
- Function Overview
- Service Overview
- Billing
- Getting Started
- User Guide
-
Best Practices
- Using MPC to Transcode Media Files in OBS
- H.264 and H.265 Low-bitrate HD Creates an Amazing Experience for Video Websites
- Snapshot Capturing Facilitates the Setup of Media Processing Platform for Your Video Website
- Video Packaging Enables the Playback of Online Education Videos on Multiple Terminal Types
- Change History
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Application Examples
- Transcoding Template APIs
- Transcoding Template Group APIs
- Watermark Template APIs
- Transcoding APIs
- Packaging APIs
- Animated GIF APIs
- Video Metadata Extraction APIs
- Snapshot APIs
-
Authorization and Configuration APIs
- Configuring Transcoding Server Event Notifications
- Querying Transcoding Server Event Notifications
- Querying All Events on a Transcoding Server
- Querying Buckets
- Authorizing or Canceling Authorization of Access to OBS Buckets
- Querying Objects in a Bucket
- Requesting OBS Authorization
- Querying the Status of OBS Authorization Task Creation
- Tenant Subscription
- Appendix
- Change History
- SDK Reference
-
FAQs
- Product Consulting
- Billing
- Upload
-
Transcoding
- Files of What Formats Can Be Transcoded?
- What If Transcoding Fails?
- Can a Transcoding Task Have Multiple Outputs?
- What Is a System Template? What Is It Used for?
- How Do I Download Output Videos?
- What Are the Differences Between DASH, HLS, and MP4 Videos?
- How Do I Share Transcoded Videos?
- How Do I Determine Whether Source Videos Can Be Transcoded to SD, HD, and UHD Videos?
- Why Is There Only Audio but No Image After Video Transcoding?
- Why Can't I Find My OBS Bucket When Creating a Transcoding Task?
- How Do I Overwrite the Input Video File with the Output Video File?
- How Long Does a Transcoding Task Take?
- How Do I Configure Transcoding Event Notifications?
- Can a Low-resolution Video Be Transcoded to a High-resolution One?
- Can I Set the Same Bucket Name and Path for Both Input and Output Buckets During Transcoding?
- Notifications
- Packaging/GIF Converting
- Frame Capture
- Video Watermark
-
API and SDK Usage
- Can I Deliver Transcoding Tasks in Batches?
- How Long Does a Task Take from Submission to Execution?
- Failed to Transcode MP3 Files and A Message Is Displayed Indicating that the Source Width and Height Are Incorrect
- Why Is "The token must be updated" Returned When I Call an API?
- Why Is a Message Displayed Indicating that the Token Is Invalid When I Call an API?
- What Can I Do If an Error Message Is Displayed Indicating that the Input or Output OBS Path Is Invalid When I Use the SDK or API?
- Does MPC Support Video Rotation?
- How Do I Call a Transcoding API to Specify an Output File Name?
- Why Can't I Cancel the Authorization After the IAM User Delegates the Read and Write Permissions on OBS Buckets?
- Videos
- General Reference
Copied.
Snapshot Capturing Facilitates the Setup of Media Processing Platform for Your Video Website
Scenarios
Video websites have diverse requirements on video snapshots, including video thumbnails, drag and view, review, posters, and still images. MPC supports synchronous and asynchronous snapshot capturing, as well as snapshot capturing at a specified time point and at a fixed interval, allowing you to quickly set up a media processing platform for your video website. For example, during video playback, you can hover the pointer over the progress bar and drag it to go to the specified position on the preview image.
How It Works
When setting up a media processing platform for your video website, you need to create a snapshot capturing task management service. This service manages operations such as creating and querying snapshot capturing tasks.
The video website snapshot capturing task management service calls the video snapshot capturing capability of MPC through SDKs/APIs. The snapshot capturing task management service obtains the source video from Object Storage Service (OBS). After a snapshot of the source video is captured as required, the snapshot file will be saved in a specified OBS path. The associated service of the video website can obtain the snapshot file information from the snapshot capturing task management service, and apply the snapshot to scenarios such as video thumbnails, drag and view during video playback, and review.
Service Name |
Function |
---|---|
Video website snapshot capturing task management service |
Manages video snapshot capturing tasks, including task creation and query. |
MPC video snapshot capturing service |
Pulls the source video from OBS, takes a snapshot of the source video as required, and saves the snapshot file in a specified OBS path. |
OBS |
Used by customers to upload and store media files |

Development Sequence Diagram



Procedure
- Upload a video file to an OBS bucket.
- Create a snapshot capturing task.
Sample code:
// Set the input video path. ObsObjInfo input = new ObsObjInfo().withBucket("<example-bucket>").withLocation("<Region ID>").withObject("<example-path/input.mp4>"); ObsObjInfo output = new ObsObjInfo().withBucket("<example-bucket>").withLocation("<Region ID>").withObject("<example-path/output>"); // Create a snapshot capturing request. CreateThumbnailsTaskRequest request = new CreateThumbnailsTaskRequest(); CreateThumbReq body = new CreateThumbReq(); List<Integer> listThumbnailParaDots = new ArrayList<>(); listThumbnailParaDots.add(50000); // Set the snapshot capturing type. Snapshots are captured at a specified time point. ThumbnailPara thumbnailParabody = new ThumbnailPara(); // Set the sampling type. Snapshots are captured at a specified time point. thumbnailParabody.withType(ThumbnailPara.TypeEnum.fromValue("DOTS")) // Set the snapshot file name. .withOutputFilename("photo") // Set the interval for snapshot capturing. .withTime(10) // Set the start time when the sampling type is set to TIME. This parameter is used together with time. .withStartTime(100) // Set the capture duration (in second) when the sampling type is set to TIME. This parameter is used together with time and start_time, indicating that the first snapshot is captured at the time specified by start_time and a snapshot is captured at the interval specified by time until the duration specified by this parameter elapses. .withDuration(1) // Array of time points when a snapshot is captured. .withDots(listThumbnailParaDots) // Set the snapshot file format. .withFormat(1) // Set the width of a snapshot. .withWidth(96) // Set the height of a snapshot. .withHeight(96); body.withThumbnailPara(thumbnailParabody); body.withOutput(output); body.withInput(input); request.withBody(body); // Send the snapshot capturing request. CreateThumbnailsTaskResponse response = initMpcClient().createThumbnailsTask(request); logger.info(response.toString()); return response.getTaskId();
- Query snapshot capturing tasks.
Sample code:
ListThumbnailsTaskRequest request = new ListThumbnailsTaskRequest(); List<String> listRequestTaskId = new ArrayList<>(); listRequestTaskId.add(taskId); request.withTaskId(listRequestTaskId); ListThumbnailsTaskResponse response = initMpcClient().listThumbnailsTask(request); logger.info(response.toString());
- Check execution results.
The ID of the created snapshot capturing task is returned.
{"task_id": "1024"}
Query the statuses and results of snapshot capturing tasks.
{ "task_array" : [ { "task_id" : 2528, "status" : "SUCCEEDED", "create_time" : 20201118121333, "end_time" : 20201118121336, "input" : { "bucket" : "example-bucket", "location" : "region01", "object" : "example-input.ts" }, "output" : { "bucket" : "example-bucket", "location" : "region01", "object" : "example-output/example-path" }, "thumbnail_info" : [ { "pic_name" : "9.jpg" }, { "pic_name" : "5.jpg" } ] } ], "is_truncated" : 0, "total" : 1 }
SDK Integration Example
For details about the video snapshot capturing feature and its sample code, see Creating a Snapshot Capturing Task.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot