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
INFILE="$1"
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=25m "$INFILE" "${INFILE%.mp4}-large.mp4" &
wait

View file

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