25 lines
566 B
Bash
25 lines
566 B
Bash
|
#!/bin/bash -e
|
||
|
|
||
|
#####################################################
|
||
|
#
|
||
|
# This script will convert a color video to black &
|
||
|
# white by reducing color saturation to 0.
|
||
|
#
|
||
|
# Usage: bash ffmpeg/filter/desaturate.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 hue=s=0 \
|
||
|
-c:v prores_ks \
|
||
|
-profile:v 3 \
|
||
|
"${OUTPUT}"
|