commit c8904e53abc2e8cf52a096bb44c259c9c8df7d39 Author: Brion Vibber Date: Sat Sep 16 09:34:10 2023 -0700 init 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