Configure K21 to process existing video or image files
The setCapturerFromFile
method configures K21 to process an existing video (.mp4) or image (.png) file instead of capturing from screen. This is useful when you want to analyze pre-recorded content.
The configuration object requires the following parameter:
Parameter | Type | Required | Description |
---|---|---|---|
file | string | Yes | Path to the file to be processed. Must be either .mp4 or .png |
.mp4
).png
)The method will throw an error in these cases:
setCapturerFromFile
if you’ve already set a screen capturer using setCapturer
Configure K21 to process existing video or image files
The setCapturerFromFile
method configures K21 to process an existing video (.mp4) or image (.png) file instead of capturing from screen. This is useful when you want to analyze pre-recorded content.
The configuration object requires the following parameter:
Parameter | Type | Required | Description |
---|---|---|---|
file | string | Yes | Path to the file to be processed. Must be either .mp4 or .png |
.mp4
).png
)The method will throw an error in these cases:
setCapturerFromFile
if you’ve already set a screen capturer using setCapturer