From c8904e53abc2e8cf52a096bb44c259c9c8df7d39 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 16 Sep 2023 09:34:10 -0700 Subject: [PATCH] init --- tone-map | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tone-map diff --git a/tone-map b/tone-map new file mode 100755 index 0000000..65b8c5a --- /dev/null +++ b/tone-map @@ -0,0 +1,23 @@ +#!/bin/sh + +OPTS="" +PEAK=1000 + +for INFILE in "$@" +do + if [[ "$1" =~ ^--.* ]] + then + echo "OPTION: $1" + OPTS="$OPTS $1" + shift + else + echo "FILE: $INFILE" + + ffmpeg \ + -i "$INFILE" \ + -crf 22 \ + -vf "zscale=t=linear,tonemap=hable:peak=$PEAK:desat=0.0,zscale=t=bt709:p=bt709:m=bt709:r=full:dither=ordered,vibrance=0.2,format=yuv420p" \ + $OPTS \ + -y "${INFILE%.mp4}-sdr.mp4" + fi +done