mwahahaha

lying about mpeg 4 visual being avc1 lets it work in hls
This commit is contained in:
Brooke Vibber 2023-03-27 12:24:04 -07:00
commit 02c01d60cf
3 changed files with 55 additions and 16 deletions

View file

@ -8,13 +8,18 @@ $video = [];
$audioCodecs = [
'mpeg' => 'mp4a.40.34',
'opus' => 'opus'
'aac' => 'mp4a.40.2',
'opus' => 'opus',
];
// @fixme use correct settings based on the file
$videoCodecs = [
'vp9' => 'vp09.00.10.08',
'h264' => 'avc1.42e00a',
//'mpeg4' => 'mp4v.20.9',
//'mpeg4' => 'mp4v.20',
//'mpeg4' => 'mp4v',
'mpeg4' => 'avc1.42e00a',
];
@ -36,7 +41,7 @@ while ( count( $argv ) > 0 ) {
$height = 480; // @fixme
$fps = 24.0; // @fixme
$baseLine = "#EXT-X-STREAM-INF:BANDWIDTH=$bandwidth,RESOLUTION={$width}x{$height},FRAME-RATE={$fps}";
if ( count( $audio ) > 1 ) {
if ( count( $audio ) >= 1 ) {
foreach ( array_keys( $audio ) as $audioCodec ) {
$codecs = implode( ',', [
$videoCodecs[$codec],