From 6f43f8994dbc1d91eb18de7ee9bda3c08cf4a0e7 Mon Sep 17 00:00:00 2001 From: iamdamosuzuki Date: Tue, 3 Nov 2020 11:40:35 -0800 Subject: [PATCH] created colorizer script --- bash_scripts/colorizer.sh | 80 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 bash_scripts/colorizer.sh diff --git a/bash_scripts/colorizer.sh b/bash_scripts/colorizer.sh new file mode 100755 index 0000000..f7428d2 --- /dev/null +++ b/bash_scripts/colorizer.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +# Colorize a video using colorchanelmixer + +_usage(){ +cat <&2 + exit +fi + + # Build filter string +filterString="colorchannelmixer=${colorNums},format=yuv422p10le" + +while getopts "hps" OPT ; do + case "${OPT}" in + h) _usage ; exit 0 + ;; + p) + ffmpeg -hide_banner -i "${2}" -c:v prores -profile:v 3 -vf $filterString -f matroska - | ffplay - + printf "\n\n*******START FFPLAY COMMANDS*******\n" >&2 + printf "ffmpeg -hide_banner -i '$2' -c:v prores -vf '${filterString}' -f matroska - | ffplay - \n" >&2 + printf "********END FFPLAY COMMANDS********\n\n " >&2 + ;; + s) + ffmpeg -hide_banner -i "${2}" -c:v prores -profile:v 3 -vf $filterString "${2%.*}_colorize_$color.mov" + printf "\n\n*******START FFMPEG COMMANDS*******\n" >&2 + printf "ffmpeg -hide_banner -i '$2' -c:v prores -profile:v 3 -vf $filterString '${2%.*}_colorize_$color.mov' \n" >&2 + printf "********END FFMPEG COMMANDS********\n\n " >&2 + ;; + *) echo "bad option -${OPTARG}" ; _usage ; exit 1 ; + esac + done