https://unix.stackexchange.com/questions/277892/how-do-i-create-a-blank-pdf-from-the-command-line
convert xc:none -page a4 blankpage.pdf
https://superuser.com/questions/104656/convert-a-pdf-to-greyscale-on-the-command-line-in-floss
gs -sOutputFile=output.pdf -sDEVICE=pdfwrite -sColorConversionStrategy=Gray \
-dProcessColorModel=/DeviceGray -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH input.pdf
The imagemagick approach is based on lossy compression and works the best with scans. Otherwise ghostscript can downsize the PDF quite effectively without sacrificing much of the quality.
https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file
convert -density 100x100 -quality 60 -compress jpeg input.pdf output.pdf
https://gist.github.com/firstdoit/6390547
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
This might just work when needing to submit ID documents to someone to see
convert -density 120 input.pdf output.pdf
https://gist.github.com/protrolium/e0dbd4bb0f1a396fcb55
ffmpeg -i input.m4a -f mp3 -ab 192k -vn output.mp3
#!/bin/bash
if [ $# -lt 2 ]; then
echo "usage: $(basename $0) <src> <dest>" >&2
exit
fi
src=${1%%/}
dest=${2%%/}
find "$src" -name '*.mp3' -print0 |
while IFS= read -r -d '' input_file; do
name=${input_file##"$src"/}
output_file="$dest/$name"
output_dir="$(dirname "$output_file")"
mkdir -p "$output_dir"
ffmpeg -i "$input_file" -f mp3 -ab 192k -vn "$output_file" </dev/null
done