.dotfiles/.local/bin/ffreduce
2024-10-22 17:00:36 +07:00

20 lines
430 B
Bash
Executable File

#!/bin/bash -e
in="$1"; shift
out="$1"; shift
smallside="${1:-720}"; 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:$smallside,setpts=0.5*PTS" "$@" "$out"
ffmpeg -i "$in" -r 24 -vcodec libx265 -vf "scale=-2:$smallside" "$@" "$out"