Documentation
SuperBoard_backup Super Board (Full version)
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Super Board (Full version)
  • Server API V2
  • Query file transcoding task status

Query file transcoding task status

Last updated:2022-12-21 17:44

Description

Queries the status of a file transcoding task.

Request method and endpoint

  • Request method: POST
  • Request endpoint: https://docs-api.zego.im/?Action=DescribeTranscodeStatus
  • Protocol: HTTPS
  • Rate limit: 10 requests/second

Request parameters

Listed below are the parameters specific to this request. For the complete list of public request parameters, see Accessing Server APIs - Public parameters..

Parameter Type Required Description
TaskId
String
Yes
File transcoding task ID.

Sample request

  • Request URL
    https://docs-api.zego.im/?Action=DescribeTranscodeStatus
    &AppId=1234567890
    &SignatureNonce=15215528852396
    &Timestamp=1234567890
    &Signature=7a2c0f11145fb760d607a07b54825013
    &SignatureVersion=2.0
    &IsTest=false
  • Request message body
    {
      "TaskId": "task"
    }

Response parameters

Parameter Type Description
Code
Int64
Error code.
Message
String
Error description.
RequestId
String
Request ID.
Data
Object
Response object.
For details, see Data member list.

The following table lists data members.

Parameter Type Description
FileHash
String
Hash value of the source file.
FileType
Int64
Source file type. The options are as follows:
  • 1: .ppt or .pptx (The value of DestinationFileType for a static file is 256, and that for an animated file is 512.)
  • 2: .doc or .docx (The value of DestinationFileType is 256.)
  • 4: .xls or .xlsx (The value of DestinationFileType is 256.)
  • 8: PDF file (The value of DestinationFileType is 256.)
  • 16: .jpg, .jpeg, .png, .bmp (The value of DestinationFileType is 16.)
  • 32: .txt (The value of DestinationFileType is 256.)
DestinationFileType
Int64
Target file type. The options are as follows:
  • 16: .jpg, .jpeg, .png, or .bmp
  • 256: vector and image
  • 512: animated PowerPoint file
FileName
String
Source file name.
FileSize
Int64
Size of the source file, in bytes.
Status
Int64
File transcoding status. For details, see Status .
FileId
String
File ID returned after successful transcoding.

The following table lists the values of Status.

Status code Description
1 Not uploaded.
2 Uploaded.
4 Queuing.
8 Transcoding.
16 Transcoding succeeded.
32 Transcoding failed.
64 Transcoding task canceled.
128 Password-protected file.
256 The file is too large, for example, containing too many pages.
512 The Excel file contains too many sheets.
1024 The file is empty. For example, the PowerPoint file contains no slide.
2048 The transcoding server failed to open the file.
4096 The target file type is not supported.
8192 The source file is read-only.
16384

The transcoding server failed to download the source file. The possible causes are as follows:

  • Unable to download the file from the source file URL in the request parameters.
  • The file hash value in the request parameters is not a 32-bit MD5 hash value.
  • The file hash value in the request parameters does not match the hash value obtained from file-based calculation.
32768 Elements that cannot be processed by transcoding tools detected in the source file, such as ink marks and graffiti. Remove the elements and transcode the file again.
32769 The file format of the Word, Excel, or PowerPoint file is invalid. Ensure that the source file can be opened by Office before transcoding the file.
32770 A security risk exists in the file to be transcoded. Ensure that no message indicating a computer damage risk for file editing is displayed when you attempt to open the file using Office.
32771 After transcoding an animated PowerPoint file, failures in exporting some images and audio and video files are detected. The transcoding server will transcode the file again.
32772 The file size is too large to transcode. Ensure that the file size meets the requirements.
32773 A dialog indicating that the file needs to be repaired (because the file is damaged) is displayed when you attempt to open the file.
32774 EOF error (incomplete file content).

Sample response

{
    "Code": 0,
    "Message": "succeed",
    "RequestId": "abcd123",
    "Data": {
        "FileHash": "abc",
        "FileType": 1,
        "DestinationFileType": 256,
        "Status": 8,
        "FileId": "fiaaaa"
    }
}

Return codes

Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.

Return code Description
60013
The file has been transcoded.
60014
The file transcoding task ID does not exist.
60015
The source file type is not supported.
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code