Cloud Recording service supports taking screenshots during recording, and screenshots are saved in JPG format.
This document describes how to take video screenshots by using the cloud recording APIs.
To capture screenshots, set the OutputFileFormat
to jpg
when calling the StartRecord
method.
You can also set the interval as needed by setting the SnapshotInterval
parameter. The service takes a screenshot of all streams every 10 seconds by default.
RecordMode
is 1 (single-stream recording mode).StreamType
is 1.You can call the DescribeRecordStatus
method to query screenshot task related information, but the file list will not be returned.
The captured screenshots during recording will be uploaded to your third-party cloud storage, and you will receive a notification through a callback every time a screenshot task is completed.
Content-type
: application/json;charset=utf-8
The request example of StartRecord
is as follows:
{
"RoomId": "xxxx",
"RecordInputParams": {
"RecordMode": 1,
"StreamType": 3,
"MaxIdleTime": 60
},
"RecordOutputParams": {
"OutputFileFormat": "jpg",
"OutputFolder": "record/",
"SnapshotInterval": 10
},
"StorageParams": {
"Vendor": 2,
"Region": "oss-xxxx",
"Bucket": "xxxx",
"AccessKeyId": "xxxx",
"AccessKeySecret": "xxxx"
}
}