GifRecorder mp4 output option
@@ -25,6 +25,7 @@ public class GifRecorder{
recordKey = KeyCode.t,
shiftKey = KeyCode.shiftLeft;
+ public boolean outputMp4 = true;
public Fi exportDirectory = Core.files == null ? Fi.get("gifs") : Core.files.local("gifs");
public float speedMultiplier = 1f;
public int recordfps = 30;
@@ -95,8 +96,9 @@ public class GifRecorder{
//linux-only
String args = Strings.format(
- "/usr/bin/ffmpeg -r @ -s @x@ -f rawvideo -pix_fmt rgba -i - -frames:v @ -filter:v vflip,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse @/@.gif",
- recordfps, (int)bounds.width, (int)bounds.height, frames.size, exportDirectory.absolutePath(), new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()).format(new Date())
+ "/usr/bin/ffmpeg -r @ -s @x@ -f rawvideo -pix_fmt rgba -i - -frames:v @ -filter:v vflip,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse @/@.@",
+ recordfps, (int)bounds.width, (int)bounds.height, frames.size, exportDirectory.absolutePath(), new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()).format(new Date()),
+ outputMp4 ? "mp4" : "gif"
);
ProcessBuilder builder = new ProcessBuilder(args.split(" ")).redirectErrorStream(true);
