WIP on HLS

got the HLS working on all browsers with VP9+AAC
now to try getting the MP3 and Opus working
This commit is contained in:
Brooke Vibber 2021-10-22 15:37:37 -07:00
commit 5a4e9aa6bb
5 changed files with 174 additions and 55 deletions

View file

@ -209,7 +209,8 @@ class Transcoder {
$segmentOptions = [];
if ( $container == 'mp4' ) {
$segmentOptions[] = '-segment_format_options';
$segmentOptions[] = 'movflags=+frag_keyframe+empty_moov';
//$segmentOptions[] = 'movflags=+frag_keyframe+empty_moov';
$segmentOptions[] = 'movflags=frag_keyframe';
}
if ( $container == 'mp3' ) {
$segmentOptions[] = '-segment_format_options';
@ -293,9 +294,8 @@ $infiles = [
foreach ( $infiles as $filename ) {
$source = new SourceFile( $filename );
$codec = new Transcoder( $source );
//$codec->audio('opus');
$codec->audio('opus');
$codec->audio('mp3');
/*
$codec->audio('aac');
foreach ( Video::FORMATS['vp9']['resolutions'] as $res => $format ) {
@ -305,5 +305,4 @@ foreach ( $infiles as $filename ) {
$codec->video('vp9', $res, 'pass2');
}
}
*/
}