zshrc: Add shortcut to compress with ffmpeg
By default, ffmpeg uses crf 23 for h.264 encoding, but for screen recordings, higher compression is usually fine too.
This commit is contained in:
parent
ece165661e
commit
0210c6ccf2
|
@ -109,3 +109,17 @@ alias git-force-push='git push origin $(git rev-parse --abbrev-ref HEAD) --force
|
||||||
|
|
||||||
# mpv
|
# mpv
|
||||||
alias mpv="mpv --autofit=70%"
|
alias mpv="mpv --autofit=70%"
|
||||||
|
|
||||||
|
# stolen from: https://fem.social/@clerie/110275008064297220
|
||||||
|
nmap-fast-ping='nmap -n --disable-arp-ping -sn $@'
|
||||||
|
|
||||||
|
# ffmpeg shortcuts
|
||||||
|
ffmpeg_compress() {
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
filename=$1:r
|
||||||
|
fileext=$1:e
|
||||||
|
ffmpeg -i $1 -c:v libx264 -preset slow -crf 28 $filename-comp.mp4
|
||||||
|
else
|
||||||
|
echo "ERROR: Please provide a file name"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue