diff --git a/pack-set b/pack-set index 7a187cb..c9bc138 100755 --- a/pack-set +++ b/pack-set @@ -11,9 +11,11 @@ for INFILE in "$@" do echo "$INFILE" - COMMON="$OPTS --hdr --exposure=-2.5 --peak=141 --fps=60000/1001" + #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="medium" + SPEED_LARGE="veryslow" SMALL="$COMMON --size=4m --preset=$SPEED_SMALL" LARGE="$COMMON --size=25m --preset=$SPEED_LARGE" diff --git a/pack-vid b/pack-vid index 7bcc76f..4c84e66 100755 --- a/pack-vid +++ b/pack-vid @@ -27,6 +27,7 @@ $options = [ 'size' => $maxBytes, 'quality' => 1.0, 'hdr' => false, + 'dither' => false, ]; while ( count( $args ) > 0 && substr( $args[0], 0, 2 ) == '--' ) { @@ -53,7 +54,8 @@ if ( count ( $args ) < 2 ) { " --fps=n frame rate limit\n" . " --size=n target file size in bytes (default 3.5M)\n" . " --quality=n fraction of base bitrate to break on (deafult 0.75)\n" . - " --hdr force HDR input processing on\n" + " --hdr force HDR input processing on\n" . + " --dither enable dithering in 8-bit downconversion\n" ); } [ $src, $dest ] = $args; @@ -267,8 +269,13 @@ function convert( $src, $dest, $options ) { $filters[] = "exposure=$exposure"; } $filters[] = "tonemap=hable:peak=$peak:desat=0.0"; - $filters[] = "zscale=t=bt709:p=bt709:m=bt709:r=full"; - $filters[] = "vibrance=0.0625"; + if ( $options['dither'] ) { + $dither = ":dither=ordered"; + } else { + $dither = ""; + } + $filters[] = "zscale=t=bt709:p=bt709:m=bt709:r=full$dither"; + $filters[] = "vibrance=0.2"; } $filters[] = "format=yuv420p"; if ( $crop ) {