本文介绍智能媒体服务截图模板参数和对应模板示例。

名称类型必填描述示例值
Typestring是截图类型。取值:
  • Cover:封面截图。
  • Normal:普通截图。
  • Sprite:雪碧截图。
Sprite
FrameTypestring是帧类型。默认值intra。取值:
  • 普通帧:normal。
  • I帧:intra。
intra
TimeLong是截图开始时间。单位:毫秒。1000
CountLong是截图数量。5
IntervalLong否截图间隔时间。单位:秒。10
Widthinteger否输出图片宽度。720
Heightinteger否输出图片高度。480
BlackLevelinteger否多帧截图针对首帧过滤黑屏图片判定阈值。30
PixelBlackThresholdinteger否判断像素点是否为黑色点的阈值。70
SpriteSnapshotConfigSpriteSnapshotConfig否雪碧图配置。详细示例请参见SpriteSnapshotConfig。
IsSptFragboolean否Webvtt截图配置是否拼合输出。取值:
  • true:拼合。
  • false:不拼合。
true

SpriteSnapshotConfig

名称类型必填描述示例值
CellWidthinteger否单图片宽度。单位px,默认为截图输出分辨率宽度。720
CellHeightinteger否单图片高度。单位px,默认为截图输出分辨率高度。480
Paddinginteger否图片间距,默认0,单位px。20
Margininteger否外框宽度,默认0,单位px。20
Columnsinteger否图片拼合列数。20
Linesinteger否图片拼合行数。20
Colorstring否背景颜色。#000000

模板示例

{
  "Type": "Normal",
  "FrameType": "normal",
  "Time": 10000,
  "Count": 8,
  "Interval": 3
}