From cab52f32f9ab627c963e5f31e0503d4ef3f28067 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 8 Mar 2023 12:03:23 -0800 Subject: [PATCH] WIP --- fmp4.html | 31 +++++++++++++++++++++++++++++++ meta-playlist.php | 10 ++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 fmp4.html diff --git a/fmp4.html b/fmp4.html new file mode 100644 index 0000000..36233d0 --- /dev/null +++ b/fmp4.html @@ -0,0 +1,31 @@ + + + + + HLS VP9/fMP4 test + + + +

HLS VP9/fMP4 test

+ +

Caminandes - Llamigos

+ +

WebM VP9 and VP8 in front, HLS with VP9-in-MP4 video with Opus-in-MP4 or AAC audio behind.

+ + +

HLS VP9+Opus or VP9+MP3, no fallbacks:

+ + +

HLS VP9+Opus or VP9+MP3, with h.264 fallback:

+ + + + \ No newline at end of file diff --git a/meta-playlist.php b/meta-playlist.php index e1f7f04..c5c4e93 100644 --- a/meta-playlist.php +++ b/meta-playlist.php @@ -42,20 +42,22 @@ while ( count( $argv ) > 0 ) { $videoCodecs[$codec], $audioCodecs[$audioCodec], ] ); - $line = "$baseLine,CODECS=\"$codecs\""; + $video[] = "$baseLine,CODECS=\"$codecs\""; + $video[] = $playlist; } } else { $codecs = $videoCodecs[$codec]; - $line = "$baseLine,CODECS=\"$codecs\",AUDIO=\"$audioCodec\""; + $video[] = "$baseLine,CODECS=\"$codecs\",AUDIO=\"$audioCodec\""; + $video[] = $playlist; } } } -$lines = array_concat( +$lines = array_merge( [ '#EXTM3U' ], array_values( $audio ), $video ); $m3u8 = implode( "\n", $lines ); -print $m3u8; +print "$m3u8\n";