Scratch for Java

FFmpeg Recorder

This recorder does only work if the FFmpeg executable is available in your path and is only supported on Linux and Mac.

The FFmpeg recorder saves a video.

import org.openpatch.scratch.Stage;
import org.openpatch.scratch.extensions.recorder.FFmpegRecorder;

public class Animation {
    public Animation() {
        Stage myStage = new Stage(254, 100);

        FFmpegRecorder recorder = new FFmpegRecorder("output.mp4");

        // do stuff


    public static void main(String[] args) {
        new Animation();