Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Animated GIF Tasks

Function

This API is used to query one or more animated GIF tasks.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/animated-graphics

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID .

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

task_id

No

Array

Task ID. A maximum of 10 task IDs can be queried at a time.

status

No

String

Task status.

Possible values:

  • INIT: initialization

  • WAITING: pending

  • PROCESSING: running

  • SUCCEED: completed

  • FAILED: failed

  • CANCELED: canceled

start_time

No

String

Start time. If task_id is specified, this parameter is invalid. Its format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone.

end_time

No

String

End time. If task_id is specified, this parameter is invalid. Its format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone.

page

No

Integer

Page number. If task_id is specified, this parameter is invalid.

Default value: 0

size

No

Integer

Number of records on each page. If task_id is specified, this parameter is invalid.

The value ranges from 1 to 100.

Default value: 10

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Authorization

No

String

Authentication information. This parameter is mandatory when AK/SK-based authentication is used.

X-Project_Id

No

String

Project ID. This parameter is mandatory when AK/SK-based authentication is used. It is same as the project ID in path parameters.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used.

x-language

No

String

Client language.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total number of tasks

tasks

Array of AnimatedGraphicsTask objects

Tasks.

Table 5 AnimatedGraphicsTask

Parameter

Type

Description

task_id

String

Task ID.

status

String

Task status.

Possible values:

  • INIT: initialized

  • WAITING: pending

  • PROCESSING: running

  • SUCCEED: successful

  • FAILED: failed

  • CANCELED: canceled

create_time

String

Task creation time.

start_time

String

Task start time.

end_time

String

Task end time.

error_code

String

Return code of a task

description

String

Error description.

user_data

String

User data.

input

ObsObjInfo object

Input file information.

output

ObsObjInfo object

Output file information.

output_param

AnimatedGraphicsOutputParam object

Animated GIF parameter.

Table 6 ObsObjInfo

Parameter

Type

Description

bucket

String

OBS bucket name

location

String

Region where an OBS bucket is located. It must be the same as the region where MPC is deployed.

object

String

OBS object path, which complies with the OSS Object definition.

  • If this parameter is used for an input, an object must be specified.

  • If this parameter is used for an output, only the directory for storing the output needs to be specified.

file_name

String

File name

  • If this parameter is specified, the output object name is object/file_name.

  • If this parameter is not specified, the output object name is object/xxx, where xxx is specified by MPC.

When it is used as the output file name:

  • Specifies the name of the output file. This parameter is valid for packaging.

  • If the output file name needs to be specified during transcoding, use the output_filenames parameter.

  • This parameter is valid for parsing. If a file name is specified during parsing, the parsing parameters are written to the specified file name and the file metadata is obtained through the query API response in JSON format.

  • This parameter is invalid for snapshot capturing.

  • This parameter is invalid for conversion into animated GIFs.

Table 7 AnimatedGraphicsOutputParam

Parameter

Type

Description

format

String

Format of an output file. Currently, only GIF format is supported.

width

Integer

Width of an output animated file

The value is -1, 0, or a multiple of 2 from 32 to 3,840.

NOTE:
  • If this parameter is set to -1, width is adjusted based on height. In this case, height cannot be -1 or 0.

  • If this parameter is set to 0, the width of the input video is used. In this case, height can only be 0.

height

Integer

Height of an output animated file

The value is -1, 0, or a multiple of 2 from 32 to 2,160.

NOTE:
  • If this parameter is set to -1, height is adjusted based on width. In this case, width cannot be -1 or 0.

  • If this parameter is set to 0, the height of the input video is used. In this case, width can only be 0.

start

Integer

Start time Unit: ms

end

Integer

End time

Unit: ms

The maximum difference between end and start is 60 seconds.

frame_rate

Integer

Frame rate of the animated GIF.

Value range: 1 to 75

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

GET https://{endpoint}/v1/{project_id}/animated-graphics?task_id=30647

Example Responses

Status code: 200

Animated GIF task queried successfully.

{
  "total" : 1,
  "tasks" : [ {
    "task_id" : 30647,
    "error_code" : "MPC.10218",
    "status" : "SUCCEED",
    "create_time" : 20201119103652,
    "start_time" : 20201119103653,
    "end_time" : 20201119103708,
    "description" : "The task has completed.",
    "input" : {
      "bucket" : "example-bucket",
      "location" : "region01",
      "object" : "example-path/input.mp4"
    },
    "output" : {
      "bucket" : "example-bucket",
      "location" : "region01",
      "object" : "example-path/output",
      "file_name" : "file_001.gif"
    },
    "output_param" : {
      "format" : "gif",
      "width" : 100,
      "height" : 50,
      "start" : 0,
      "end" : 10000,
      "frame_rate" : 15
    }
  } ]
}

Status code: 400

Failed to query the animated GIF task.

{
  "error_code" : "MPC.10202",
  "error_msg" : "Invalid request parameter."
}

Status Codes

Status Code

Description

200

Animated GIF task queried successfully.

400

Failed to query the animated GIF task.

Error Codes

See Error Codes.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback