.dotfiles/.local/bin/ffreduce
2024-10-01 13:47:31 +07:00

20 lines
427 B
Bash
Executable File

#!/bin/bash -e
in="$1"; shift
out="$1"; shift
smalside="${1:-480}"; shift || true
if ! [ -r "$in" ]; then
echo "error: can't read '$in'" >&2
exit 1
fi
if [ -z "$out" ]; then
echo "error: output file name can't be empty" >&2
exit 1
fi
set -x
#ffmpeg -i "$in" -r 24 -vcodec libx265 -vf "scale=-2:$smalside,setpts=0.5*PTS" "$@" "$out"
ffmpeg -i "$in" -r 24 -vcodec libx265 -vf "scale=-2:$smalside" "$@" "$out"