Skip to content

Instantly share code, notes, and snippets.

View saurabhwahile's full-sized avatar

Saurabh Wahile saurabhwahile

View GitHub Profile
@shazow
shazow / convert-gifs.sh
Last active January 22, 2024 10:13
Batch convert a directory of gifs into mp4
#!/usr/bin/bash
# Convert *.gif into *.mp4, skip if already exists.
outdir="."
for path in *.gif; do
out="${outdir}/${path/.gif/}.mp4"
[[ -f "$out" ]] && continue
ffmpeg -f gif -i "${path}" "${out}"
done