https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/video.mp4?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast,可以截图。
http://lawyer-zaobao.oss-cn-wulanchabu.aliyuncs.com/1674980396369_78ec566195023b8de74df04529f30e8c.mp4?OSSAccessKeyId=STS.NUZu162twnda9WuvAcCWzE&Expires=1675101164&Signature=dh7tcf0f%2Bf2CdGmwk%2B5VrkkM%3D&security-token=CAIS%2BAF1q6Ft5yfSjIr5aMKPDumO4XhbacbELQ3Vcges5PrJLRpzz2IHlJfHBpA%2BsZs%2FgwnmpT6%2FgdlqV3QoBUSFaBdcJo444PGogXmwKZ6aKP9rUhpMCPOwr6UmzWvqL7Z%2BH%2BU6muGJOEYEzFkSle2KbzcS7YMXWuLZyOj%2BwMDL1VJH7aCwBLH9BLPABvhdYHPH%2FKT5aXPwXtn3DbATgD2GM%2Bqxsmtv3hn53Ft0GF0wShm7BInemrfMj4NfsLFYxkTtK40NZxcqf8yyNK43BIjvwv0fQdoG2c4YzBXAMLuEjYbPCx%2B9luPRJ%2FYbMhAalAoegjcTvUXiM9%2FBqAATAyKpJBie8%2F0%2F%2BNDscRRJVV6HBEbhffkEXjg5Ea64lzsUxNjyX6VjIvabYUvEghBMk3IXfvdcRz8IuaOzYH2Un4Bq8pp%2BCylGKYo4LlhI6AnYSGSM2XyE%2BLXzdYc%2ByzCmX0BuOxVZH4r2zxnqfKJYtkw0Si8Y&x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast,无法截图
需要将鉴权地址改为公共读取权限,即将上述鉴权地址中的OSSAccessKeyId、Expires、Signature、security-token参数去掉,变成公共读取权限的地址,如:http://lawyer-zaobao.oss-cn-wulanchabu.aliyuncs.com/1674980396369_78ec566195023b8de74df04529f30e8c.mp4,然后再添加上x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast参数,即可截图。
生成带签名的视频截帧URL 您可以通过SDK生成带签名的视频截帧URL,以Java SDK为例,代码如下:
生成带签名的视频截帧URL与生成带签名的图片处理URL的方法类似。 注意事项 使用视频截帧时,按视频截帧截取的图片数量计费。有关计费详情的更多信息,请参见数据处理费用。 仅支持对视频编码格式为H264和H265的视频文件进行视频截帧。 OSS默认不保存视频截帧的图片,视频截帧的图片需手动下载并保存至本地。