hackfix for hdr

go based on the surface type which sucks
but will be good enough for now
This commit is contained in:
Brooke Vibber 2023-06-10 18:32:35 -07:00
parent 830b10c318
commit f772f4a618
2 changed files with 8 additions and 6 deletions

View file

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

View file

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