You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/scripts/.bin/deshake-video.sh

15 lines
473 B
Bash

#!/bin/sh
# Encode a video in DVD quality (-crf 23) and use the video stabilization/deshaking plugin
# https://ffmpeg.org/ffmpeg-filters.html#toc-vidstabdetect-1
for VIDEO in "$@"
do
DEST=converted/$VIDEO
if [ -f $DEST ]; then
echo "File $VIDEO already converted"
continue
fi
mkdir -p converted
ffmpeg -i $VIDEO -vf vidstabdetect -f null -
ffmpeg -i $VIDEO -vf vidstabtransform=smoothing=30:input="transforms.trf" -crf 23 $DEST
done