This commit is contained in:
Brooke Vibber 2022-06-06 15:33:52 -07:00
parent 34703fbb86
commit 8493a4eb3c
7 changed files with 71 additions and 16 deletions

View file

@ -2,5 +2,5 @@
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",NAME="English",LANGUAGE="en-US",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="audio-mp3.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",NAME="English",LANGUAGE="en-US",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="audio-mp3.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=4785000,RESOLUTION=352x288,FRAME-RATE=29.970,CODECS="s263" #EXT-X-STREAM-INF:BANDWIDTH=4785000,RESOLUTION=352x288,FRAME-RATE=29.970,CODECS="h263"
h263-in-3gp.m3u8 h263-in-3gp.m3u8

View file

@ -2,5 +2,5 @@
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",NAME="English",LANGUAGE="en-US",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="audio-mp3.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",NAME="English",LANGUAGE="en-US",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="audio-mp3.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=4785000,RESOLUTION=352x288,FRAME-RATE=29.970,CODECS="s263" #EXT-X-STREAM-INF:BANDWIDTH=4785000,RESOLUTION=352x288,FRAME-RATE=29.970,CODECS="h263"
h263-in-mov.m3u8 h263-in-mov.m3u8

View file

@ -2,5 +2,5 @@
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",NAME="English",LANGUAGE="en-US",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="audio-mp3.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",NAME="English",LANGUAGE="en-US",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="audio-mp3.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=4785000,RESOLUTION=352x288,FRAME-RATE=29.970,CODECS="s263" #EXT-X-STREAM-INF:BANDWIDTH=4785000,RESOLUTION=352x288,FRAME-RATE=29.970,CODECS="h263"
h263-in-mp4.m3u8 h263-in-mp4.m3u8

View file

@ -19,6 +19,10 @@
<source type="video/mp4; codecs=&quot;avc1.640032, mp4a.40&quot;" src=polyphon-h264-aac.mp4> <source type="video/mp4; codecs=&quot;avc1.640032, mp4a.40&quot;" src=polyphon-h264-aac.mp4>
</video> </video>
<p>This one will be VP9/MP3 in MP4 listed as mp4a.6b:</p>
<video id=flat2a controls width=640 height=360>
<source type="video/mp4; codecs=&quot;vp09.00.10.08, mp4a.6b&quot;" src=polyphon-vp9-mp3.mp4>
</video>
<p>This one will be h264 only:</p> <p>This one will be h264 only:</p>
<video id=flat3 controls width=640 height=360> <video id=flat3 controls width=640 height=360>

View file

@ -6,11 +6,36 @@
</head> </head>
<body> <body>
<h1>HLS WebM test with codec</h1> <h1>HLS WebM test with codec</h1>
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio:</p> <p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with MP3 audio:</p>
<video id=hls1 controls width=640 height=360> <video id=hls1 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-mp3-mp4.m3u8> <source type=application/vnd.apple.mpegurl src=av-mp3-mp4.m3u8>
</video> </video>
<p id=err></p> <p id=err1></p>
<p>And with MP3 audio and only H.264 (marked as mp4a.6b):</p>
<video id=hls2 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-mp3-h264.m3u8>
</video>
<p id=err2></p>
<p>And with MP3-in-MP4 audio (marked as mp3):</p>
<video id=hls3 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-mp3mp4-h264.m3u8>
</video>
<p id=err3></p>
<p>And with MP3-in-MP4 audio (marked as mp4a.6b):</p>
<video id=hls4 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-mp3mp4b-h264.m3u8>
</video>
<p id=err4></p>
<p>And with MP3-in-TS audio:</p>
<video id=hls5 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-ts-h264.m3u8>
</video>
<p id=err5></p>
<script> <script>
let codes = { let codes = {
[MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED', [MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED',
@ -18,11 +43,18 @@
[MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE', [MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE',
[MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED', [MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED',
}; };
hls1.addEventListener('error', function() { function errify(hls, err) {
let {code, message} = this.error; hls.addEventListener('error', function() {
let codeName = codes[code]; let {code, message} = this.error;
err.textContent = `${code} ${codeName}: ${message}`; let codeName = codes[code];
}); err.textContent = `${code} ${codeName}: ${message}`;
});
}
errify(hls1, err1);
errify(hls2, err2);
errify(hls3, err3);
errify(hls4, err4);
errify(hls5, err5);
</script> </script>
</body> </body>

View file

@ -6,11 +6,25 @@
</head> </head>
<body> <body>
<h1>HLS WebM test with codec</h1> <h1>HLS WebM test with codec</h1>
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio:</p>
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio marked as mp4a.ad:</p>
<video id=hls1 controls width=640 height=360> <video id=hls1 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-opus-mp4.m3u8> <source type=application/vnd.apple.mpegurl src=av-opus-mp4.m3u8>
</video> </video>
<p id=err></p> <p id=err></p>
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio marked as opus:</p>
<video id=hls2 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-opusb-mp4.m3u8>
</video>
<p id=err2></p>
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio marked as Opus:</p>
<video id=hls3 controls width=640 height=360>
<source type=application/vnd.apple.mpegurl src=av-opusc-mp4.m3u8>
</video>
<p id=err3></p>
<script> <script>
let codes = { let codes = {
[MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED', [MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED',
@ -18,11 +32,16 @@
[MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE', [MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE',
[MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED', [MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED',
}; };
hls1.addEventListener('error', function() { function errify(hls, err) {
let {code, message} = this.error; hls.addEventListener('error', function() {
let codeName = codes[code]; let {code, message} = this.error;
err.textContent = `${code} ${codeName}: ${message}`; let codeName = codes[code];
}); err.textContent = `${code} ${codeName}: ${message}`;
});
}
errify(hls1, err1);
errify(hls2, err2);
errify(hls3, err3);
</script> </script>
</body> </body>

0
sync-up.sh Normal file → Executable file
View file