fixes for options
This commit is contained in:
parent
64d494825c
commit
5ba048b8c8
2 changed files with 12 additions and 10 deletions
10
pack-vid
10
pack-vid
|
|
@ -31,6 +31,7 @@ $options = [
|
|||
'width' => false,
|
||||
'height' => false,
|
||||
'keyframe-int' => 0,
|
||||
'vibrance' => 0,
|
||||
];
|
||||
|
||||
while ( count( $args ) > 0 && substr( $args[0], 0, 2 ) == '--' ) {
|
||||
|
|
@ -300,6 +301,7 @@ function convert( $src, $dest, $options ) {
|
|||
$peakNits = floatval( $options['peak'] );
|
||||
$sdrNits = 80;
|
||||
$peak = $peakNits / $sdrNits;
|
||||
$vibrance = floatval( $options['vibrance'] );
|
||||
|
||||
$filters = [ "scale=w=$scaleWidth:h=$scaleHeight" ];
|
||||
if ( $hdr ) {
|
||||
|
|
@ -313,8 +315,10 @@ function convert( $src, $dest, $options ) {
|
|||
} else {
|
||||
$dither = "";
|
||||
}
|
||||
$filters[] = "zscale=t=bt709:p=bt709:m=bt709:r=full$dither";
|
||||
$filters[] = "vibrance=0.2";
|
||||
$filters[] = "zscale=tin=linear:t=709:p=709:m=709:r=full$dither";
|
||||
if ( $vibrance ) {
|
||||
$filters[] = "vibrance=$vibrance";
|
||||
}
|
||||
}
|
||||
$filters[] = "format=yuv420p";
|
||||
if ( $crop ) {
|
||||
|
|
@ -337,7 +341,6 @@ function convert( $src, $dest, $options ) {
|
|||
'-i', $src,
|
||||
'-f', 'mp4',
|
||||
'-fpsmax', $fps,
|
||||
//'-r', $fps,
|
||||
'-vf', $vf,
|
||||
'-c:v', 'libx264',
|
||||
'-b:v', $bitrate,
|
||||
|
|
@ -354,7 +357,6 @@ function convert( $src, $dest, $options ) {
|
|||
'-i', $src,
|
||||
'-vf', $vf,
|
||||
'-fpsmax', $fps,
|
||||
//'-r', $fps,
|
||||
'-c:v', 'libx264',
|
||||
'-b:v', $bitrate,
|
||||
'-preset', $preset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue