From 910b3e0c167b226d4c659ef0cf736a2dcfea8b81 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Sat, 31 Aug 2024 11:15:51 -0400 Subject: [PATCH] feat: don't create 'out.gif' by default Only create a GIF file if `Output .gif` appears in the tape file. Closes #363 --- video.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/video.go b/video.go index 1cbf77f55..949f7a409 100644 --- a/video.go +++ b/video.go @@ -138,11 +138,7 @@ func buildFFopts(opts VideoOptions, targetFile string) []string { // MakeGIF takes a list of images (as frames) and converts them to a GIF. func MakeGIF(opts VideoOptions) *exec.Cmd { - targetFile := opts.Output.GIF - - if opts.Output.GIF == "" && opts.Output.WebM == "" && opts.Output.MP4 == "" { - targetFile = "out.gif" - } else if opts.Output.GIF == "" { + if opts.Output.GIF == "" { return nil } @@ -152,7 +148,7 @@ func MakeGIF(opts VideoOptions) *exec.Cmd { //nolint:gosec return exec.Command( "ffmpeg", - buildFFopts(opts, targetFile)..., + buildFFopts(opts, opts.Output.GIF)..., ) }