unix4artists/ffmpeg/filter/negative.sh

25 lines
557 B
Bash
Raw Normal View History

2021-05-08 16:53:26 +00:00
#!/bin/bash -e
#####################################################
#
# This script will invert all colors of a video and
# save the output in a ProRes video.
#
# Usage: bash ffmpeg/filter/negative.sh <input video> <output video>
#
#####################################################
INPUT="${1}"
OUTPUT="${2}"
# Check if output file extension is .mov
if [[ "${OUTPUT}" != *".mov" ]]; then
echo "Please use an .mov extension on your output file argument"
exit 1
fi
ffmpeg -i "${INPUT}" \
-vf negate \
-c:v prores_ks \
-profile:v 3 \
"${OUTPUT}"