Skip to content

Commit 408945b

Browse files
Add utility script for making clean-looking GIFs from OBS video
1 parent 0b4f568 commit 408945b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

convert_mp4_to_gif.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Array of file paths
4+
files=(
5+
"/home/elias/Remove Newlines From Selection Demo.mp4"
6+
"/home/elias/Remove Blank Lines From Selection.mp4"
7+
"/home/elias/Paste Without Newlines Demo.mp4"
8+
"/home/elias/Paste Without Blank Lines.mp4"
9+
)
10+
11+
# Loop through each file and convert to GIF
12+
for file in "${files[@]}"; do
13+
output="${file%.mp4}.gif"
14+
ffmpeg -i "$file" -lavfi "[0]split[a][b];[a]palettegen[p];[b]fifo[v];[v][p]paletteuse,format=pal8" -loop 0 "$output"
15+
done
16+

0 commit comments

Comments
 (0)