This commit is contained in:
Brooke Vibber 2023-01-14 19:16:50 -08:00
parent 2a55fc989f
commit af0592e892

View file

@ -1,8 +1,10 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
// Squishes given video input into 4000kb .mp4 // Squishes given video input into sub-4000kb .mp4
// Crops to 16:9 // Crops to 16:9
// Strips audio
// HDR to SDR tonemapping
// Picks bitrate to match // Picks bitrate to match
// Picks resolution based on bitrate target // Picks resolution based on bitrate target
// 2-pass encoding with libx264 veryslow // 2-pass encoding with libx264 veryslow
@ -11,7 +13,7 @@ $args = $_SERVER['argv'];
$self = array_shift( $args ); $self = array_shift( $args );
if ( count ( $args ) < 2 ) { if ( count ( $args ) < 2 ) {
die( "Usage: pack-vid.php <srcfile.mp4> <destfile.mp4>\n" ); die( "Usage: $self <srcfile.mp4> <destfile.mp4>\n" );
} }
[ $src, $dest ] = $args; [ $src, $dest ] = $args;
convert( $src, $dest ); convert( $src, $dest );