1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-05 13:11:43 +00:00
dotfiles/scripts/.bin/deshake-video.sh
J. Fernando Sánchez ea78b16bd9 Multiple changes
2018-09-12 19:04:59 +02:00

15 lines
473 B
Bash
Executable File

#!/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