FFmpegRecorder()
Browser availability: desktop-only.
This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.
The FFmpegRecorder class extends the Recorder class to provide functionality for recording frames and converting them into a video file using FFmpeg.
This class creates a temporary directory to store PNG files for each frame and uses FFmpeg to convert these frames into a video file when the recording is stopped.
Usage example:
FFmpegRecorder recorder = new FFmpegRecorder("/path/to/output/video.mp4");
recorder.saveFrame();
recorder.stop();
Note: Ensure that FFmpeg is installed and available in the system's PATH.
Syntax
Java
new FFmpegRecorder(path)