tencent cloud

Document Transcoding Event
Last updated:2023-12-21 10:55:54
Document Transcoding Event
Last updated: 2023-12-21 10:55:54

Transcoding Progress

Event Name
TranscodeProgressChanged
Event Description
The application background will receive a notification when the document transcoding progress changes. EventData Data Structure Definition
Parameter Name
Type
Description
TaskId
String
Task ID of a document with progress changed
Progress
Integer
Current transcoding progress
Resolution
String
Document resolution. Change the value into an empty string before the document transcoding service parses the resolution.
Title
String
Document title. Change the value into an empty string before the document transcoding service parses the title.
Pages
Integer
Total number of pages in a document. Change the value into 0 before the document transcoding service parses the total number of pages.
Example
{
"EventType": "TranscodeProgressChanged",
"ExpireTime": 1590046391,
"SdkAppId": 1400000001,
"Sign": "a2dabb362a9b811c0e26953a6276a41c",
"Timestamp": 1575545412,
"EventData": {
"TaskId": "bj0mt2l23osdj300hl30",
"Progress": 24,
"Resolution": "1024x768",
"Title": "TEST-IMAGE.ppt",
"Pages": 16
}
}

Transcoding Completion

Event Name
TranscodeFinished
Event Description
The application background will receive a notification when the document transcoding finishes.
EventData Data Structure Definition
Parameter Name
Type
Description
TaskId
String
Task ID of a document with transcoding finished
Resolution
String
Document resolution
Title
String
Document title
Pages
Integer
Total number of pages in a document
ResultUrl
String
Document transcoding results
ThumbnailUrl
String
Thumbnail URL
ThumbnailResolution
String
Thumbnail resolution
CompressFileUrl
String
Download URL of a compressed file with transcoding results
Error.Code
String
This field will exist if a document transcoding error occurs. For specific error code descriptions, please refer to the API document DescribeTranscode.
Error.Message
String
Specific error descriptions for errors if occur in document transcoding
Example
Example 1 Successful Transcoding Callback
{
"ExpireTime": 1590046391,
"SdkAppId": 1400000001,
"Sign": "a2dabb362a9b811c0e26953a6276a41c",
"Timestamp": 1575545412,
"EventType": "TranscodeFinished",
"EventData": {
"TaskId": "bj0mt2l23osdj300hl30",
"Resolution": "1024x768",
"Title": "TEST-IMAGE.ppt",
"Pages": 16,
"ResultUrl": "https://transcode-result/0agdnligqtgtvkm65emb/index.html",
"ThumbnailUrl": "https://transcode-thumbnal/0agdnligqtgtvkm65emb/",
"ThumbnailResolution": "793x1122",
"CompressFileUrl": ""
}
}
Example 2 Failed Transcoding Callback
{
"ExpireTime": 1590046391,
"SdkAppId": 1400000001,
"Sign": "a2dabb362a9b811c0e26953a6276a41c",
"Timestamp": 1575545412,
"EventType": "TranscodeFinished",
"EventData": {
"Error": {
"Code": "InvalidParameter.UrlFormatError",
"Message": "The document download URL is invalid."
},
"TaskId": "bj0mt2l23osdj300hl30",
"Resolution": "",
"Title": "",
"Pages": 0,
"ResultUrl": "",
"ThumbnailUrl": "",
"ThumbnailResolution": "",
"CompressFileUrl": ""
}
}


PPT Detection Completion

Event Name
PPTCheckFinished
Event Description
The application background will receive a notification when the PPT detection finishes.
EventData Data Structure Definition
Parameter Name
Type
Description
TaskId
String
Task ID
IsOK
Bool
This parameter is used to check whether a PPT file is normal or not.
ResultUrl
String
The repaired PPT URL will only have a return value when the parameter is AutoHandleUnsupportedElement=true in the process of creating a task.
Slides
Array of ErrSlide
List of PPT error pages
ErrSlide Data Structure Definition
Parameter Name
Type
Description
Page
String
Page
Errs
Array of ErrInfo
List of error elements
ErrInfo Data Structure Definition
Parameter Name
Type
Description
Name
String
Element name
Type
int
0: Unsupported ink type; 1: Auto-page turning is not supported; 2: Presence of corrupt audio and video; 3: Presence of inaccessible resource; 4: Read-only file
Detail
String
Error Details
Example
Example 1 Callback without Detected Exceptions
{
"ExpireTime": 1590046391,
"SdkAppId": 1400000001,
"Sign": "a2dabb362a9b811c0e26953a6276a41c",
"Timestamp": 1575545412,
"EventType": "PPTCheckFinished",
"EventData": {
"TaskId": "bj0mt2l23osdj300hl30",
"IsOK": true
}
}
Example 2 Callback with Detected Exceptions
{
"ExpireTime": 1590046391,
"SdkAppId": 1400000001,
"Sign": "a2dabb362a9b811c0e26953a6276a41c",
"Timestamp": 1575545412,
"EventType": "PPTCheckFinished",
"EventData": {
"TaskId": "bj0mt2l23osdj300hl30",
"IsOK": false,
"ResultUrl": "https://xxx/xxx/TEST-IMAGE_fixed.ppt",
"Slides": [
{
"Page": "Slide 5",
"Errs": [{
"Name": "Ink 1",
"Type": 0,
"Detail": "WPS Ink Mark",
}]
}
]
}
}
Example 3 Callback with Detection Failure
{
"ExpireTime": 1590046391,
"SdkAppId": 1400000001,
"Sign": "a2dabb362a9b811c0e26953a6276a41c",
"Timestamp": 1575545412,
"EventType": "PPTCheckFinished",
"EventData": {
"Error": {
"Code": "InvalidParameter.UrlFormatError",
"Message": "The document download URL is invalid."
},
"TaskId": "bj0mt2l23osdj300hl30"
}
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback