Skip to content

Instantly share code, notes, and snippets.

View nickferrando's full-sized avatar
💭
I may be slow to respond.

Nick Ferrando nickferrando

💭
I may be slow to respond.
View GitHub Profile
@nickferrando
nickferrando / imagemagick-ubuntu.txt
Last active April 25, 2024 04:05
Install ImageMagick with JPG, PNG and TIFF Delegates - Ubuntu (20.04)
#These are the steps required in order to Install ImageMagick with JPG, PNG and TIFF delegates.
sudo apt-get update
#Install Build-Essential in order to configure and make the final Install
sudo apt-get install build-essential
#libjpg62-dev required in order to work with basic JPG files
@nickferrando
nickferrando / logoresize.sh
Last active May 11, 2020 14:37
Proportional Resizing Overlays with ImageMagick
#!/bin/bash
#Make sure to replace "YOURPATH" with your logo/graphic overlay path, on line 5.
for f in *.png *.jpg
do magick $f -set option:sz "%[fx:min(w,h)*20/100]" \
\( YOURPATH -resize "%[sz]" \) \
-alpha on -channel rgba -gravity northeast \
-define compose:args=50,100 -composite $f
done
@nickferrando
nickferrando / wavtoflac.sh
Last active May 9, 2020 20:59
FFMPEG WAV to FLAC Batch Formula [Ubuntu]
#!/bin/bash
#This script creates a new folder named "processed" in the working directory,
#then finds every file with .WAV extension and convert it to FLAC (Free Lossless Audio Codec).
#It also copy the metadata informations associated with the input (where they exists) to the output.
mkdir processed
for i in *.wav
do ffmpeg -i "$i" -nostdin -map_metadata:s:a 0:s:a -c:a flac "./processed/${i%.*}.flac"
done