From 1603c45b7af26ad98bcd4c607bee84471596a47a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 4 Apr 2023 09:33:12 -0700 Subject: [PATCH 1/5] update --- fmp4-codecs.html | 2 +- fmp4-tracks.html | 2 +- fmp4.html | 98 +----------------------------------------------- index.html | 2 +- 4 files changed, 4 insertions(+), 100 deletions(-) diff --git a/fmp4-codecs.html b/fmp4-codecs.html index 6b4b176..1c32180 100644 --- a/fmp4-codecs.html +++ b/fmp4-codecs.html @@ -10,7 +10,7 @@

Caminandes - Llamigos

-

back to main fmp4 entry

+

back to main fmp4 entry

Single video codecs with Opus .mp4 and MP3 raw audio

diff --git a/fmp4-tracks.html b/fmp4-tracks.html index c4651bc..e33a945 100644 --- a/fmp4-tracks.html +++ b/fmp4-tracks.html @@ -10,7 +10,7 @@

Caminandes - Llamigos

-

back to main fmp4 entry

+

back to main fmp4 entry

Component tracks

VP9 .mp4:

diff --git a/fmp4.html b/fmp4.html index c7f2c08..4421fed 100644 --- a/fmp4.html +++ b/fmp4.html @@ -1,97 +1 @@ - - - - - HLS VP9/fMP4 test - - - -

HLS VP9/fMP4 test

- -

Caminandes - Llamigos

- - - -

With fallbacks

- -

HLS with VP9 (.mp4)/MJPEG (.mov) video tracks and Opus/MP3 audio tracks. Video.js enabled to provide HLS-over-MSE for Chrome/Firefox.

-
- -
- - -

Current behavior:

-

Browsers that play the VP9 track will get sharp video, those that play the MJPEG track will get blurry video. Audio should sound the same either way.

- - - - - - - - - - \ No newline at end of file +index.html \ No newline at end of file diff --git a/index.html b/index.html index c7f2c08..4a50434 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@
  • Apple HLS player -

    With fallbacks

    +

    HLS only:

    -

    HLS with VP9 (.mp4)/MJPEG (.mov) video tracks and Opus/MP3 audio tracks. Video.js enabled to provide HLS-over-MSE for Chrome/Firefox.

    +

    HLS with correctly-labeled VP9 (.mp4) and MJPEG (.mov) video tracks and Opus (.mp4, for Chrome/Firefox) and MP3 (.mp3, used by Safari) audio tracks. Video.js is enabled but will not yet override the native HLS in Safari Desktop.

    +

    WebM or HLS:

    +

    WebM VP9/Opus, WebM VP8/Vorbis, or HLS. Current versions of desktop Safari should see one or the other WebM, and those that fall back to the HLS may or may not work.

    +
    + +
    + +

    Current behavior:

    -

    Browsers that play the VP9 track will get sharp video, those that play the MJPEG track will get blurry video. Audio should sound the same either way.

    +

    Browsers that play the VP9 track or one of the WebM files will get sharp video, those that play the MJPEG track will get blurry video. Audio should sound the same either way.

    @@ -94,4 +166,4 @@ } - \ No newline at end of file + diff --git a/make-fmp4.sh b/make-fmp4.sh index 074bba5..ac46805 100755 --- a/make-fmp4.sh +++ b/make-fmp4.sh @@ -13,8 +13,10 @@ VIDEO_MPEG4="-vcodec mpeg4 -g 240 $BITRATE_HI $SIZE_MAIN" VIDEO_H263="-vcodec h263 -g 240 $BITRATE_LO $SIZE_H263" VIDEO_MJPEG="-vcodec mjpeg $BITRATE_HI $SIZE_SMALL" VIDEO_VP9="-vcodec libvpx-vp9 -tile-columns 2 -row-mt 1 -cpu-used 3 -g 240 $BITRATE_LO $SIZE_MAIN" +VIDEO_VP8="-vcodec libvpx -slices 4 -cpu-used 3 -g 240 $BITRATE_HI $SIZE_MAIN" AUDIO_OPUS="-acodec libopus -ac 2 -ar 48000 -ab 96k" +AUDIO_VORBIS="-acodec libvorbis -ac 2 -ar 48000 -ab 128k" AUDIO_AAC="-ac 2 -ar 48000 -ab 128k" AUDIO_MP3="-acodec libmp3lame -ac 2 -ar 48000 -ab 128k" @@ -49,10 +51,15 @@ ffmpeg -i $INFILE -vn $AUDIO_MP3 -y fmp4.audio.mpeg.mp3 #ffmpeg -i $INFILE -an $VIDEO_MJPEG $AUDFLAGS -y fmp4.120p.mjpeg.mp4 #ffmpeg -i $INFILE -an $VIDEO_MJPEG $AUDFLAGS -y fmp4.120p.mjpeg.mov +# Flat fallbacks +#ffmpeg -i $INFILE $AUDIO_OPUS $VIDEO_VP9 -pass 1 -y flat.480p.vp9-opus.webm +#ffmpeg -i $INFILE $AUDIO_OPUS $VIDEO_VP9 -pass 2 -y flat.480p.vp9-opus.webm +#ffmpeg -i $INFILE $AUDIO_VORBIS $VIDEO_VP8 -pass 1 -y flat.480p.vp8-vorbis.webm +#ffmpeg -i $INFILE $AUDIO_VORBIS $VIDEO_VP8 -pass 2 -y flat.480p.vp8-vorbis.webm + # Playlist processing php HLS/rewrite-mp3.php fmp4.audio.mpeg.mp3 > fmp4.audio.mpeg.mp3.m3u8 -#php extract-playlist.php fmp4.audio.mpeg.mp3 > fmp4.audio.mpeg.mp3.m3u8 php extract-playlist.php fmp4.audio.mpeg.mp4 > fmp4.audio.mpeg.mp4.m3u8 php extract-playlist.php fmp4.audio.mpeg.mov > fmp4.audio.mpeg.mov.m3u8 php extract-playlist.php fmp4.audio.aac.mp4 > fmp4.audio.aac.mp4.m3u8 From 1937687d03af3307efce72f696367fa62490381f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 14 Apr 2023 14:34:48 -0700 Subject: [PATCH 5/5] wip --- fmp4-alt.html | 72 ++++++++++++++++++----------------------------- fmp4-tracks.html | 5 ++++ meta-playlist.php | 2 ++ 3 files changed, 34 insertions(+), 45 deletions(-) diff --git a/fmp4-alt.html b/fmp4-alt.html index 1afe733..381c4a8 100644 --- a/fmp4-alt.html +++ b/fmp4-alt.html @@ -15,64 +15,29 @@
  • see component track list
  • -

    With fallbacks

    +

    Native HLS

    -

    HLS with VP9 (.mp4)/MJPEG (.mov) video tracks and Opus/MP3 audio tracks. Video.js enabled to provide HLS-over-MSE for Chrome/Firefox/desktop Safari.

    +

    HLS with VP9 in mp4, JPEG in mp4, and Opus and AAC in mp4

    +

    Overridden HLS

    -

    Current behavior:

    -

    Browsers that play the VP9 track will get sharp video, those that play the MJPEG track will get blurry video. Audio should sound the same either way.

    - +

    HLS with VP8 in mp4, JPEG in mp4, and Opus and AAC in mp4

    +
    + +
    -