#!/bin/bash -e
#####################################################
#
# This command will re-encode a video into an MOV
# container with a ProRes HQ (422) video stream and
# audio preserved in its original format.
#
# -i "${INPUT}"
# Sets the first argument, saved as variable "$INPUT"
# as the input file that ffmpeg will re-encode. Must
# go at the beginning of your command.
#
# -c:v prores_ks
# Sets the video codec of the output video to be ProRes
# using the "prores_kostya" library.
#
# -profile:v 3
# Sets the ProRes profile to 3 or "HQ" use on the output
# video stream. The profiles available: 0 = proxy (PR),
# 1 = light (LT), 2 = standard (ST), 3 = high quality (HQ),
# 4 = 4444, 5 = 4444 (XQ)
#
# -c:a copy
# Copies the audio stream and preserves the format
# and codec from the original file.
#
# "${OUTPUT}"
# The output video file, which should be the last
# argument you provide.
#
# More info: https://avpres.net/FFmpeg/im_ProRes.html
# https://codecs.multimedia.cx/2012/03/a-few-words-about-my-prores-encoder/
#
# Usage: bash ffmpeg/basic/prores.sh