This commit is contained in:
Brooke Vibber 2023-04-23 11:46:50 -07:00
parent a031c1fd95
commit 0977424242
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
INFILE="$1" INFILE="$1"
shift shift
COMMON="--quality=0.67 --exposure=-3 --peak=125 --crop" COMMON="--quality=0.67 --exposure=-3 --peak=100 --preset=slow"
pack-vid $COMMON --size=4m "$INFILE" "${INFILE%.mp4}-small.mp4" & pack-vid $COMMON --size=4m "$INFILE" "${INFILE%.mp4}-small.mp4" &
pack-vid $COMMON --size=25m "$INFILE" "${INFILE%.mp4}-large.mp4" & pack-vid $COMMON --size=25m "$INFILE" "${INFILE%.mp4}-large.mp4" &
wait wait

View file

@ -20,6 +20,7 @@ $options = [
'no-audio' => false, 'no-audio' => false,
'exposure' => '0', // stops 'exposure' => '0', // stops
'peak' => '1000', // '10000' is max 'peak' => '1000', // '10000' is max
'preset' => 'slow',
'fps' => '60000/1001', 'fps' => '60000/1001',
'size' => $maxBytes, 'size' => $maxBytes,
'quality' => 1.0, 'quality' => 1.0,
@ -44,6 +45,7 @@ if ( count ( $args ) < 2 ) {
" --no-audio strip audio\n" . " --no-audio strip audio\n" .
" --exposure=n adjust exposure\n" . " --exposure=n adjust exposure\n" .
" --peak=n set HDR peak nits\n" . " --peak=n set HDR peak nits\n" .
" --preset=key set h.264 encoding preset\n" .
" --fps=n frame rate limit\n" . " --fps=n frame rate limit\n" .
" --size=n target file size in bytes (default 3.5M)\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" " --quality=n fraction of base bitrate to break on (deafult 0.75)\n"
@ -220,9 +222,7 @@ function convert( $src, $dest, $options ) {
$fps = $options['fps']; $fps = $options['fps'];
// $preset = 'veryslow'; // annoying at higher resolutions $preset = $options['preset'];
$preset = 'slow';
//$preset = 'fast';
$tempPrefix = 'pack-vid-passlog' . rand(0,1 << 31); $tempPrefix = 'pack-vid-passlog' . rand(0,1 << 31);
$passlog = tempnam( '.', $tempPrefix ); $passlog = tempnam( '.', $tempPrefix );