Created
September 10, 2024 14:27
-
-
Save peterkappus/096d36c157c9c7cf294ca51aab868f81 to your computer and use it in GitHub Desktop.
Revisions
-
peterkappus created this gist
Sep 10, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/bash # TIP: use Quicktime Player to capture a short screencast and convert to animated gif. # Great for sharing software demos in chat/etc. # Check if input and output file parameters are provided if [ $# -ne 2 ]; then echo "Usage: $0 <input_file> <output_file>" exit 1 fi INPUT_FILE=$1 OUTPUT_FILE=$2 # Run the docker command with the provided filenames docker run -i -v "$(pwd)":/data jrottenberg/ffmpeg \ -i "/data/$INPUT_FILE" \ -filter_complex "[0:v] fps=5,scale=480:-1,split [a][b];[a] palettegen=max_colors=16 [p];[b][p] paletteuse" \ "/data/$OUTPUT_FILE"