Skip to content

Commit

Permalink
Fixed GIF recorder mp4 output
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Jun 13, 2024
1 parent d7f8ea8 commit 732de1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extensions/recorder/src/arc/gif/GifRecorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class GifRecorder{
speedMinusKey = KeyCode.minus,
speedPlusKeep = KeyCode.plus;

public boolean outputMp4 = false;
public boolean outputMp4 = true;
public Fi exportDirectory = Core.files == null ? Fi.get("gifs") : Core.files.local("gifs");
public float speedMultiplier = 1f;
public float[] speedModes = {0.1f, 0.25f, 0.5f, 1f, 2f, 4f, 8f};
Expand Down Expand Up @@ -121,8 +121,9 @@ public void update(){
//pix_fmt yuv420p -profile:v baseline -level 3.0 -vcodec libx264 -crf 18 -
//linux-only
String args = Strings.format(
"/usr/bin/ffmpeg -r @ -s @x@ -f rawvideo -pix_fmt rgba -i - -frames:v @ -filter:v vflip@ @/@.@",
"/usr/bin/ffmpeg -r @ -s @x@ -f rawvideo -pix_fmt rgba -i - -frames:v @ -filter:v vflip@ @@/@.@",
recordfps, (int)bounds.width, (int)bounds.height, frames.size, outputMp4 ? "" : ",split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse",
(outputMp4? "-c:v libx264 -pix_fmt yuv420p " : ""),
exportDirectory.absolutePath(), new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()).format(new Date()),
outputMp4 ? "mp4" : "gif"
);
Expand Down

0 comments on commit 732de1b

Please sign in to comment.