2020-09-28

Unicode normalization

NFD to NFC with convmv
 $ brew install convmv

 # Convert all files in a directory from NFD to NFC:
 $ convmv -f utf-8 -t utf-8 --nfc --notest .

 # Convert all files in a directory from NFC to NFD:
 $ convmv -f utf-8 -t utf-8 --nfd --notest .
NFD to NFC with iconv
 $ iconv -f UTF-8 -t UTF-8-MAC
NFD to NFC with rsync
 $ rsync --iconv=utf-8,utf-8-mac

2020-09-27

MP4 to GIF with FFMpeg

 $ ffmpeg -i INPUT.mp4 -f gif OUTPUT.gif
Additional options
 -ss 60.0 : skip 60 seconds
 -t 5 : for 5 seconds
 -r 12 : framerate 12fps
 -y : replace existing file
Example
 $ ffmpeg -i INPUT.mp4 -y -f gif -r 24 -ss 63.0 -t 2.5 OUTPUT.gif