Parameter | Description |
Format | The screenshot format (only JPG is supported currently). |
Width | The screenshot width (px). Value range: 128-4096. |
Height | The screenshot height (px). Value range: 128-4096. |
FillType | The fill mode ( FillType ) specifies how the source video is processed when its aspect ratio does not match the output aspect ratio. The following fill modes are supported: Stretch: The source video is stretched to match the output aspect ratio. This may cause the video to appear distorted. Fill with black: The original aspect ratio is retained, leaving black bars. Fill with white: The original aspect ratio is retained, leaving white bars. Gaussian blur: The original aspect ratio is retained, and Gaussian blur is applied to the blank spaces. |
Parameter | Description |
Format | The screenshot format (only JPG is supported currently). |
Width | The screenshot width (px). Value range: 128-4096. |
Height | The screenshot height (px). Value range: 128-4096. |
SampleType | How sampling intervals are measured. Sampling intervals can be measured in two ways: By percent: Intervals are measured by percent. For example, if Interval is set to 5 (%), 20 screenshots will be generated for a video. By time: Intervals are measured by time. For example, if Interval is set to 10 (sec), the number of screenshots generated will depend on the video length. |
Interval | The sampling interval. If the interval measurement (SampleType) is by percent, this parameter is a percent value. If interval measurement is by time, this parameter is a time value (sec). |
FillType | The fill mode ( FillType ) specifies how the source video is processed when its aspect ratio does not match the output aspect ratio. The following fill modes are supported:Stretch: The source video is stretched to match the output aspect ratio. This may cause the video to appear distorted. Black-leaving: The original aspect ratio is retained, leaving black bars. Blank-leaving: The original aspect ratio is retained, leaving blank spaces. Gaussian blur: The original aspect ratio is retained, and Gaussian blur is applied to the blank spaces. |
Parameter | Description |
Format | The format of the image sprite (only JPG is supported currently). |
Width | The width of the subimage in an image sprite. |
Height | The height of the subimage in an image sprite. |
Rows | The number of image rows in a sprite. |
Columns | The number of image columns in a sprite. |
SampleType | How sampling intervals are measured. Currently, only sampling by time is supported. |
Interval | The time interval for image sampling. |
Width
x Columns
(i.e., sprite width) should be within the range of 128-4096.Height
x Rows
(i.e., sprite height) should be in the range of 128-4096.MediaProcessTask.SnapshotByTimeOffsetTaskSet
.procedure
parameter to the task flow you created.procedure
in the upload signature to the task flow you created.{"EventType":"ProcedureStateChanged","ProcedureStateChangeEvent":{"TaskId":"1256768367-Procedure-2e1af2456351812be963e309cc133403t0","Status":"FINISH","FileId":"5285890784246869930","FileName":"Animal World","FileUrl":"http://1256768367.vod2.myqcloud.com/xxx/xxx/AtUCmy6gmIYA.mp4","MetaData":{"AudioDuration":60,"AudioStreamSet":[{"Bitrate":383854,"Codec":"aac","SamplingRate":48000}],"Bitrate":1021028,"Container":"mov,mp4,m4a,3gp,3g2,mj2","Duration":60,"Height":480,"Rotate":0,"Size":7700180,"VideoDuration":60,"VideoStreamSet":[{"Bitrate":637174,"Codec":"h264","Fps":23,"Height":480,"Width":640}],"Width":640},"MediaProcessResultSet":[{"Type":"SnapshotByTimeOffset","SnapshotByTimeOffsetTask":{"Status":"SUCCESS","ErrCode":0,"Message":"","Input":{"Definition":10,"Definition":[3, 6, 9]},"Output":{"Definition":10,"PicInfoSet":[{"TimeOffset":3,"Url":"http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx1.jpg"},{"TimeOffset":6,"Url":"http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx2.jpg"},{"TimeOffset":9,"Url":"http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx3.jpg"}]}}},{"Type":"SampleSnapshot","SampleSnapshotTask":{"Status":"SUCCESS","ErrCode":0,"Message":"","Input":{"Definition":10},"Output":{"Definition":10,"SampleType": "Percent","Interval": 10,"WaterMarkDefinition": [],"ImageUrlSet":["http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx1.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx2.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx3.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx4.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx5.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx6.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx7.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx8.jpg","http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx9.jpg"]}}},{"Type":"ImageSprites","ImageSpriteTask":{"Status":"SUCCESS","ErrCode":0,"Message":"","Input":{"Definition":10},"Output":{"Definition":10,"Height":80,"Width":142,"TotalCount":1,"ImageUrlSet":["http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx1.jpg"],"WebVttUrl":"http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx.vtt"}}},{"Type":"CoverBySnapshot","CoverBySnapshotTask":{"Status":"SUCCESS","ErrCode":0,"Message":"","Input":{"Definition":10,"PositionType":"Time","PositionValue":0},"Output":{"CoverUrl":"http://1256768367.vod2.myqcloud.com/xxx/xxx/xxx.jpg"}}}],"TasksPriority":0,"TasksNotifyMode":""}}
ProcedureStateChangeEvent.MediaProcessResultSet
contains four types of results, namely SnapshotByTimeOffset
, SampleSnapshot
, ImageSprites
, and CoverBySnapshot
, which represent a time point screenshot task, a sampled screenshot task, an image sprite screenshot task, and a thumbnail generation task respectively.
Was this page helpful?