最近更新时间:2024.04.01 18:01:09
首次发布时间:2021.02.23 10:42:39
本文为您介绍工作流执行完成事件的类型、说明、内容和回调示例等。
WorkflowComplete
如果您的空间配置了工作流执行完成回调通知,工作流执行完成后您将收到事件回调通知。配置方法详见事件通知概览。关键接口:触发工作流。
参数 | 类型 | 说明 |
---|---|---|
RequestId | String | 请求 ID。用于请求跟踪、问题排查。 |
Version | String | 版本号。用于标识回调数据的版本,取值为 x.x,如 1.0 |
EventType | String | 事件类型。 |
EventTime | String | 事件产生时间。为 UTC 时间,形如 2006-01-02T15:04:05Z |
Data | Object | 回调内容自定义数据。为 JSON 格式。 |
参数 | 类型 | 说明 |
---|---|---|
Code | String | 状态码 |
Message | String | 信息 |
Vid | String | 视频 ID |
RunId | String | 工作流任务 ID |
SpaceName | String | 空间名 |
TemplateId | String | 工作流模板 ID |
CallbackArgs | String | 回调参数 |
SourceInfo | SourceInfo | 片源信息 |
PosterUri | String | 视频封面图 Object ID |
TranscodeInfos | Array of TranscodeInfo | 转码信息流 |
AdaptBitrateTranscodeInfos | Array of AdaptBitrateTranscodeInfos | 自适应码流信息流 说明 如需使用自适应码流 ABR 功能,请提交工单联系技术支持开通。 |
Snapshots | Array of Snapshot | 截图结果 |
参数 | 类型 | 描述 |
---|---|---|
FileId | String | 文件 ID |
Md5 | String | 文件哈希。取值为 FileHash。 |
FileType | String | 文件类型。类型为视频、纯音频。 |
Codec | String | 编码类型 |
Height | Integer | 高 |
Width | Integer | 宽 |
Format | String | 格式 |
Duration | Float | 视频时长 |
Size | Integer | 文件大小,单位为字节 |
FileName | String | 文件路径 |
StoreUri | String | 对象存储地址 |
Definition | String | 清晰度 |
Bitrate | Integer | 码率 |
Fps | Float | 帧率 |
CreateTime | String | 创建时间 |
Inspection | Inspection | 片源检测结果,无则为空。 |
SourceAdjustResult | SourceAdjustResult | 片源调整结果,仅检测时为空。 |
RepairResult | RepairResult | 片源修复结果,无则为空。 |
参数 | 类型 | 描述 |
---|---|---|
BlackFrames | Array of BlackFrameInfo | 黑帧检测结果, 有则返回。 |
interlace | Boolean | 水波纹检测结果, 有则返回 |
Quality | Quality | 视频质量, 有则返回 |
DeLogo | Array of DeLogoInfo | 去水印检测结果,有则返回 |
Suffix | Suffix | 后贴片检测结果,有则返回 |
参数 | 类型 | 描述 |
---|---|---|
Start | Float | 黑帧开始时间 |
End | Float | 黑帧结束时间 |
Duration | Float | 黑帧持续时间 |
参数 | 类型 | 描述 |
---|---|---|
Visual | VisualQuality | 片源图像质量参数,有则返回 |
VolumeInfo | VolumeInfo | 音量,有则返回 |
参数 | 类型 | 描述 |
---|---|---|
VQScore | Float | 画质检测-VQScore 视频质量评分 |
Contrast | Float | 对比度 |
Colorfulness | Float | 色彩 |
Brightness | Float | 亮度 |
Texture | Float | 纹理 |
Noise | Float | 噪声 |
参数 | 类型 | 描述 |
---|---|---|
Loudness | Float | 响度, 单位:LUFS |
Peak | Float | 峰值, 取值范围为(0, 1.0],峰值归一化 |
MeanVolume | Float | 均值, 单位:dB |
MaxVolume | Float | 最大值, 单位:dB |
参数 | 类型 | 描述 |
---|---|---|
AnchorWidth | Integer | Anchor 宽度 |
AnchorHeight | Integer | Anchor 高度 |
PosX | Integer | 水印左上角 X 坐标 |
PosY | Integer | 水印左上角 Y 坐标 |
SizeX | Integer | 水印宽度 |
SizeY | Integer | 水印高度 |
参数 | 类型 | 描述 |
---|---|---|
StartTime | Float | 开始时间 |
EndTime | Float | 结束时间 |
参数 | 类型 | 描述 |
---|---|---|
AdjustType | String |
|
Vid | String | 仅生成新 Vid 的方式会返回该字段 |
参数 | 类型 | 描述 |
---|---|---|
BlackFrames | Integer | 黑帧去除结果。0 未执行,1 已执行。 |
Interlace | Integer | 水波纹去除结果。0 未执行,1 已执行。 |
DeLogo | Integer | 去水印去除结果。0 未执行,1 粗粒度,2 精细化。 |
Suffix | Integer | 后贴片去除结果。0 未执行,1 已执行。 |
参数 | 类型 | 描述 |
---|---|---|
FileId | String | 文件 ID |
Md5 | String | 文件哈希 |
FileType | String | 文件类型 |
LogoType | String | logo 类型 |
Encrypt | Boolean | 是否加密 |
Format | String | 格式 |
Duration | Float | 时长 |
Size | Integer | 文件大小,单位为字节 |
FileName | String | 文件路径 |
StoreUri | String | 对象存储地址 |
VideoStreamMeta | VideoStreamMeta | 视频流信息 |
AudioStreamMeta | AudioStreamMeta | 音频流信息 |
Quality | EncodedQuality | 转码流质量参数,无则为空 |
RepairResult | RepairResult | 转码流修复结果,无则为空 |
CreateTime | String | 创建时间 |
Height | Integer | 高 |
Width | Integer | 宽 |
Fps | Float | 帧率 |
Bitrate | Integer | 视频码率 |
参数 | 类型 | 描述 |
---|---|---|
Duration | Float | 视频流时长 |
Definition | Float | 清晰度 |
Codec | String | 编码类型 |
Bitrate | Integer | 视频码率 |
参数 | 类型 | 描述 |
---|---|---|
Codec | String | 编码类型,仅在纯音频时返回 |
Duration | Float | 音频流时长 |
SampleRate | Float | 音频采样率,仅在纯音频时返回 |
Bitrate | Integer | 音频码率,仅在纯音频时返回 |
参数 | 类型 | 描述 |
---|---|---|
Visual | VisualQuality | 转码流图像质量参数。有则返回 |
VolumeInfo | VolumeInfo | 音量,有则返回 |
PSNR | PSNR | PSNR (Peak Signal-to-Noise Ratio) 峰值信噪比结果。有则返回 |
SSIM | SSIM | SSIM (Structural SIMilarity) 结构相似性结果。仅转码后视频可计算,有则返回 |
VMAF | Float | VMAF(Video Multi-method Assessment Fusion),有则返回 |
参数 | 类型 | 描述 |
---|---|---|
PSNR_Y | Float | y 分量 psnr |
PSNR_U | Float | u 分量 psnr |
PSNR_V | Float | v 分量 psnr |
PSNR_G | Float | Global psnr 默认推荐用 psnr_g |
参数 | 类型 | 描述 |
---|---|---|
SSIM_Y | Float | y 分量 ssim |
SSIM_U | Float | u 分量 ssim |
SSIM_V | Float | v 分量 ssim |
SSIM_G | Float | Global ssim 默认推荐用 ssim_g |
参数 | 类型 | 描述 |
---|---|---|
FileId | String | 文件 ID |
Encrypt | Boolean | 是否加密 |
LogoType | String | Logo 类型 |
Format | String | 格式 |
Size | Integer | 文件,单位为字节 |
StoreUri | String | 对象存储地址 |
SubAdaptBitrateStreamMetas | Array of SubAdaptBitrateStreamMeta | 子流元信息 |
CreateTime | String | 创建时间 |
参数 | 类型 | 描述 |
---|---|---|
FileType | String | 文件类型。取值如下:
|
Codec | String | 编码类型。 说明 当参数 |
Height | Integer | 高。 说明 当参数 |
Width | Integer | 宽。 说明 当参数 |
Duration | Float | 时长,单位为 s。 |
Definition | String | 清晰度。 说明 当参数 |
Bitrate | Integer | 码率 |
Fps | Float | 帧率。 说明 当参数 |
Size | Integer | 文件大小,单位为字节 |
参数 | 类型 | 说明 |
---|---|---|
Type | String | 截图类型。取值如下:
|
Params | Object | 参考下面具体的类型。 |
参数 | 类型 | 说明 |
---|---|---|
Format | String | 文件格式,参照截图模板。如 jpeg |
StoreUri | String | 文件存储位置 |
Width | Integer | 宽 |
Height | Integer | 高 |
参数 | 类型 | 说明 |
---|---|---|
Format | String | 文件格式,参照截图模板。如 jpeg |
StoreUri | String | 存放地址 |
Width | Integer | 宽 |
Height | Integer | 高 |
参数 | 类型 | 说明 |
---|---|---|
Format | String | 文件格式,参照截图模板。如 jpeg |
StoreUri | String | 存放地址 |
Width | Integer | 宽 |
Height | Integer | 高 |
参数 | 类型 | 说明 |
---|---|---|
Format | String | 文件格式,参照截图模板。如 jpeg |
StoreUris | Array of String | 多张缩略图存储位置 |
CellWidth | Integer | 宽 |
CellHeight | Integer | 高 |
ImgXLen | Integer | 水平方向小图个数 |
ImgYLen | Integer | 垂直方向小图个数 |
Interval | Integer | 截图间隔,单位为 s |
CaptureNum | Integer | 截取数量 |
参数 | 类型 | 说明 |
---|---|---|
Format | String | 文件格式,参照截图模板。如 jpeg |
StoreUris | Array of String | 多张采样截图存储地址。在点播控制台的截图模板中配置采样截图的输出方式选择截图 Uri 时,结果在该参数 说明 该 |
IndexUri | String | 截图 Index 文件 Uri 地址。在点播控制台的截图模板中配置采样截图的输出方式选择截图地址文件时,结果在该参数 说明
|
Width | Integer | 宽 |
Height | Integer | 高 |
Interval | Float | 截图间隔,单位为 s |
CaptureNum | int32 | 截图数量 |
Duration | Float | 原片时长 |
Offsets | Array of Float | 记录各个截图的时间点。默认会升序排序输出。 |
参数 | 类型 | 说明 |
---|---|---|
Format | String | 文件格式,参照截图模板。如 jpeg |
StoreUri | String | 存储地址 |
Width | Integer | 宽 |
Height | Integer | 高 |
错误码 | 说明 |
---|---|
Success | 成功 |
InvalidParameter.InvalidMediaStream | 解析音视频流失败 |
InvalidParameter.MissingMediaStream | 缺少音视频流 |
InvalidParameter.InvalidUriError | 用户地址非法 |
InvalidParameter.InvalidVidOrUri | 输入源不存在 |
InternalError | 内部错误 |
InternalError.DownloadError | 系统下载错误 |
InternalError.UploadError | 系统上传错误 |
InternalError.ExecutionTimeout | 系统错误导致执行超时 |
Vid 模式下,工作流执行完成事件的回调示例如下所示。
{ "Version": "1.0", "Data": { "Code": "Success", "Snapshots": [ { "Params": { "OffsetTime": 0, "StoreUri": "tos***/cbe797357ecf439291dbec4a26b69dd5", "Width": 360, "Height": 640, "Format": "jpeg" }, "Type": "Poster" }, { "Params": { "OffsetTime": 0, "StoreUri": "tos***/c5d95e55fdbb46709b62c8c5f7e4a6aa", "Width": 360, "Height": 640, "Format": "gif" }, "Type": "Dynpost" }, { "Params": { "Width": 540, "Height": 960, "Format": "webp", "Uri": "tos***/89523e5554a74***9c6898761055a83" }, "Type": "AIDynpost" }, { "Params": { "StoreUri": "tos***/250f70a8010945f5b1ca005d315bc889", "Width": 360, "Height": 640, "Format": "webp" }, "Type": "AnimatedPoster" }, { "Params": { "StoreUris": [ "tos***/14437a144eb149f7a8a38b8b731f8a96" ], "CellHeight": 240, "ImgXLen": 5, "CaptureNum": 1, "Interval": 10, "ImgYLen": 5, "Format": "jpeg", "CellWidth": 136 }, "Type": "Sprite" }, { "Params": { "StoreUris": [ "tos***/fd5856116d7c454daa44b906f37fabee" ], "CaptureNum": 1, "Width": 540, "Height": 960, "Format": "jpeg", "Duration": 14.933333, "Interval": 10, "Offsets": [1] }, "Type": "Sample" } ], "TemplateId": "995745b286fc4be***3cf6f65877df72", "SpaceName": "test", "SourceInfo": { "Bitrate": 2240042, "Definition": "unknown", "FileName": "111", "RepairResult": {}, "StoreUri": "tos**/111", "Width": 720, "FileType": "video", "SourceAdjustResult": {}, "Format": "MP4", "Codec": "h264", "Inspection": { "Quality": {} }, "Md5": "4ee56e0d8a687***173a65dc73b7", "FileId": "v0ccfeg7007a***3c77ucpfe19890", "Duration": 15.093, "Size": 4226121, "Height": 1280, "Fps": 30, "CreateTime": "2023-04-10T11:05:31Z" }, "Vid": "v0ccfeg7007acg***c77ucpfe19890", "TranscodeInfos": [ { "Quality": { "Visual": { "Noise": 0, "Contrast": 0, "Colorfulness": 0, "Texture": 0, "Brightness": 0 } }, "AudioStreamMeta": { "Bitrate": 64701, "SampleRate": 44100, "Duration": 15.046, "Codec": "aac" }, "FileName": "owzbee1ls6pzUnZQok2Q0lkgZiDfZIfgecJnQ7", "CreateTime": "2023-04-10T11:06:59Z", "VideoStreamMeta": { "Bitrate": 430977, "Definition": "360p", "Duration": 14.933, "Codec": "h264" }, "StoreUri": "tos***/owzbee1ls6pzUnZQok2Q0lkgZiDfZIfgecJnQ7", "Width": 360, "FileType": "video", "Format": "MP4", "Duration": 15.047, "Bitrate": 501844, "LogoType": "", "Encrypt": false, "FileId": "e5f487ef36cb47a***1212f8086070", "Size": 943907, "Height": 640, "Fps": 30 }, { "Quality": { "Visual": { "Noise": 0, "Contrast": 0, "Colorfulness": 0, "Texture": 0, "Brightness": 0 } }, "AudioStreamMeta": { "Bitrate": 64000, "Duration": 15.073, "Codec": "mp3", "SampleRate": 44100 }, "FileName": "oIIAzkUPzBf2jH59MwUrIfhCa7z2oMBkyNS6hM", "CreateTime": "2023-04-10T11:08:09Z", "VideoStreamMeta": { "Definition": "", "Bitrate": 0, "Duration": 0 }, "StoreUri": "tos***/oIIAzkUPzBf2jH59MwUrIfhCa7z2oMBkyNS6hM", "Width": 0, "FileType": "audio", "Format": "MP3", "Duration": 15.073, "Bitrate": 64134, "LogoType": "", "Encrypt": false, "FileId": "24a57db262ec41***3d33577db4e1362", "Size": 120834, "Height": 0, "Fps": 0 } ], "SubAdaptBitrateStreamMetas": [ { "Height": 480, "Size": 1307500, "Fps": 25, "Duration": 40.16, "Codec": "h264", "Definition": "480p", "FileType": "Video", "Width": 854, "Bitrate": 355019 } ], "FileId": "cb8873e4cbe5***023b6fb80a8ba", "CreateTime": "2023-10-25T08:37:34Z", "Format": "DASH", "LogoType": "watermark", "Encrypt": true } ], "PosterUri": "tos***/0f2cd3c43e8346d096a42ce8f58b466d", "CallbackArgs": "", "Message": "Success", "RunId": "bb:d5d9c4581b238***2a08ccb73457e24" }, "EventType": "WorkflowComplete", "RequestId": "20230410190649D***4BE92C2507504B", "EventTime": "2023-04-10T11:08:38Z" }
DirectUrl 模式下,工作流执行完成事件的回调示例如下所示。
{ "Version": "1.0", "Data": { "Code": "Success", "Snapshots": [ { "Params": { "OffsetTime": 0, "StoreUri": "tos/f3159cf887***be5815eecd0f429", "Width": 360, "Height": 640, "Format": "jpeg" }, "Type": "Poster" }, { "Params": { "OffsetTime": 0, "StoreUri": "tos/b56db927142***a8ca67e33d9a93", "Width": 360, "Height": 640, "Format": "gif" }, "Type": "Dynpost" }, { "Params": { "OffsetTime": 0, "StoreUri": "tos/5e1296c71af***68e7296e82175e77f", "Width": 540, "Height": 960, "Format": "webp" }, "Type": "AIDynpost" }, { "Params": { "OffsetTime": 0, "StoreUri": "tos/439201bda9a***b44d905504c6d578", "Width": 360, "Height": 640, "Format": "webp" }, "Type": "AnimatedPoster" }, { "Params": { "StoreUris": [ "tos/140b0807c2fe4***2e8d807f5bf3c22" ], "ImgXLen": 5, "Interval": 10, "CaptureNum": 1, "CellWidth": 136, "ImgYLen": 5, "Format": "jpeg", "CellHeight": 240 }, "Type": "Sprite" }, { "Params": { "StoreUris": [ "tos/e981ff2e41054a2b***63da3703d6ba4f" ], "CaptureNum": 1, "Width": 540, "Height": 960, "Format": "jpeg", "Duration": 14.933333, "Interval": 10, "Offsets": [1] }, "Type": "Sample" } ], "TemplateId": "995745b286f***3993cf6f65877df72", "SpaceName": "test", "SourceInfo": { "Md5": "4ee56e0d8a6***0d5173a65dc73b7", "StoreUri": "tos/111***", "Width": 720, "Height": 1280, "Size": 4226121, "Bitrate": 2240042, "Duration": 15.093, "Fps": 30 }, "Vid": "", "TranscodeInfos": [ { "AudioStreamMeta": { "Bitrate": 64701, "SampleRate": 44100, "Duration": 15.046, "Codec": "aac" }, "Quality": { "Visual": { "Noise": 0, "Contrast": 0, "Colorfulness": 0, "Texture": 0, "Brightness": 0 } }, "VideoStreamMeta": { "Bitrate": 430977, "Definition": "360p", "Duration": 14.933, "Codec": "h264" }, "StoreUri": "tos/d10f3838a86a4***8cdc9452305fb", "Width": 360, "FileType": "Video", "Format": "MP4", "Duration": 15.047, "Bitrate": 501827, "FileId": "15a01d88a6e64***b732f4f5006cf0b6", "Encrypt": false, "LogoType": "", "Size": 943875, "Height": 640, "Fps": 30 }, { "AudioStreamMeta": { "Bitrate": 64000, "Duration": 15.073, "Codec": "mp3", "SampleRate": 44100 }, "Quality": { "Visual": { "Noise": 0, "Contrast": 0, "Colorfulness": 0, "Texture": 0, "Brightness": 0 } }, "VideoStreamMeta": { "Definition": "", "Bitrate": 0, "Duration": 0 }, "StoreUri": "tos/62038dc1a***9718de3344a6d49502d", "Width": 0, "FileType": "Audio", "Format": "MP3", "Duration": 15.072653, "Bitrate": 64134, "FileId": "a3c1862cfe244***0fad9b692b91d", "Encrypt": false, "LogoType": "", "Size": 120834, "Height": 0, "Fps": 0 } ], "CallbackArgs": "", "Message": "Success", "RunId": "bb:f417ffeac602***738e334bffbef2fd" }, "EventType": "WorkflowComplete", "RequestId": "2023041019072***841FA060A92080760", "EventTime": "2023-04-10T11:08:46Z" }