From f772f4a61882343d6ad5602bf93b30c082b20027 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 10 Jun 2023 18:32:35 -0700 Subject: [PATCH] hackfix for hdr go based on the surface type which sucks but will be good enough for now --- pack-set | 9 ++++----- pack-vid | 5 ++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pack-set b/pack-set index c9bc138..3581d51 100755 --- a/pack-set +++ b/pack-set @@ -11,11 +11,10 @@ for INFILE in "$@" do echo "$INFILE" - #COMMON="$OPTS --hdr --exposure=-2.5 --peak=141 --fps=60000/1001" - COMMON="$OPTS --hdr --exposure=-2 --peak=500 --fps=60000/1001" - SPEED_SMALL="veryslow" - #SPEED_LARGE="medium" - SPEED_LARGE="veryslow" + #COMMON="$OPTS --exposure=-2.5 --peak=141" + COMMON="$OPTS" + SPEED_SMALL="slow" + SPEED_LARGE="slow" SMALL="$COMMON --size=4m --preset=$SPEED_SMALL" LARGE="$COMMON --size=25m --preset=$SPEED_LARGE" diff --git a/pack-vid b/pack-vid index c5894f8..88fb4b9 100755 --- a/pack-vid +++ b/pack-vid @@ -150,7 +150,10 @@ function convert( $src, $dest, $options ) { $duration = floatval( $track->duration ); $width = $track->width; $height = $track->height; - $hdr = $track->color_primaries === 'bt2020' || $options['hdr']; + // @fixme some files are missing this? trims from qt? + //$hdr = $track->color_primaries === 'bt2020' || $options['hdr']; + // pix_fmt: "yuv420p10le" + $hdr = substr( $track->pix_fmt, -5 ) === 'p10le' || $options['hdr']; $keyframeInt = ceil( $duration * 60 ); $bitrate = floor( $maxBits / $duration );