Linux Stuff > Cheatsheets

Caption GIFs

Using ImageMagick, you can captian GIFs with this simple script (which is a one-liner).

#!/bin/sh convert $1 -coalesce -pointsize 48 -draw "gravity south fill black text 0,12 '$3' fill white text 2,11 '$3'" -layers Optimize $2

Video to GIF

By default, ffmpeg doesn't convert to GIF very well. This line will make a high quality GIF.

ffmpeg -i video.mp4 -vf "fps=24,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif

tar

TAR is an archiving utility. It handles a variety of compression formats, but those can get messy to keep track of.

A typical compress command should look like this:

tar -czf file1.dat file2.dat archive.tar.gz

while a typical decompress command should look like this:

tar -xzf archive.tar.gz .

Compress/Decompress

-c, --create [FILES...] Create a new archive.
-x, --extract [FILES...] Extract files
-f, --file [FILE] Output file

Formats

--lzip LZIP
--lzma LZMA
--lzop LZOP
--zstd ZSTD
--Z, --compress / --uncompress zcat
-j, --bzip2 BZIP2
-J, --xz XZ
-z, --gzip, --gunzip, --ungzip GZip / GunZip

Quick Navigate

Caption GIFs
Video to GIF
tar

(c)2024 Wirlaburla