Capture Screenshots
Overview
This page shows how to capture screenshots by the command line. With screenshots, you can analyze and monitor the video contents to ensure that the contents are permissible.
Before proceeding, ensure that you have compiled the Agora Recorder Demo and know how to record a call by the command line. For more information, see Record by Command Line.
Implementation
You can use the getVideoFrame
parameter to set the format of the recording files. You can also use the captureInterval
parameter to set the screen capture interval, which must be longer than one second and the default value is five seconds.
The following sections describe the getVideoFrame
and captureInterval
parameters in details.
Set the format of the recording files
Use the getVideoFrame
parameter to set the format of the recording files depending on your recording mode.
In individual recording mode (isMixingEnabled
is set as 0), you can set the getVideoFrame
parameter as 3, 4, or 5.
Use case | Settings |
---|---|
Only capture screenshots | -- getVideoFrame 3 : Capture video frames in the JPEG format.-- getVideoFrame 4 : Capture screenshots in the JPEG format. |
Capture screenshots while recording | -- getVideoFrame 5 : |
Set the screen capture interval
You can also use the captureInterval
parameter to set the screen capture interval, which must be longer than one second and the default value is five seconds.
Example
The following example shows how to capture screenshots in JPEG format in individual recording mode.