This commit is contained in:
Brooke Vibber 2023-09-16 09:34:10 -07:00
commit c8904e53ab

23
tone-map Executable file
View file

@ -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