83153981 by David LaPalomento

Add working instructions on generating an MSE segment

Suggest ffmpeg + bento4. ffmpeg by itself produces an invalid esds and I couldn't find the correct set of flags to get mp4box to fragment an mp4 in an MSE-compatible way.
1 parent c91abcf6
...@@ -772,6 +772,9 @@ videojs.textifyMp4 = function(inspectedMp4, depth) { ...@@ -772,6 +772,9 @@ videojs.textifyMp4 = function(inspectedMp4, depth) {
772 .map(function(byte) { 772 .map(function(byte) {
773 return ' ' + ('00' + byte.toString(16)).slice(-2); 773 return ' ' + ('00' + byte.toString(16)).slice(-2);
774 }).join('').match(/.{1,24}/g); 774 }).join('').match(/.{1,24}/g);
775 if (!bytes) {
776 return prefix + '<>';
777 }
775 if (bytes.length === 1) { 778 if (bytes.length === 1) {
776 return prefix + '<' + bytes.join('').slice(1) + '>'; 779 return prefix + '<' + bytes.join('').slice(1) + '>';
777 } 780 }
......
...@@ -33,12 +33,17 @@ ...@@ -33,12 +33,17 @@
33 <header> 33 <header>
34 <p> 34 <p>
35 This page can help you inspect the results of the 35 This page can help you inspect the results of the
36 transmuxing to mp4 files performed by videojs-contrib-hls. 36 transmuxing to mp4 files performed by
37 </p> 37 videojs-contrib-hls. It's still a bit tricky to create a
38 <p> 38 MSE-compatible fragmented MP4. We've had luck
39 Looking for the FLV tool? Check out 39 with <a href="http://www.bento4.com/developers/dash/">Bento4</a>
40 the <a href="index.html">FLV utility</a>. 40 and ffmpeg. If you have both of those utilities installed,
41 </p> 41 you can create a working MP4 like this:
42 <pre>
43 ffmpeg -i movie.ts -vn -codec copy -absf aac_adtstoasc movie-audio.mp4
44 mp4fragment --track audio --fragment-duration 11000 movie-audio.mp4 movie-audio.m4s
45 </pre>
46 <small>Looking for the <a href="index.html">FLV tool</a>?</small>
42 </header> 47 </header>
43 <section> 48 <section>
44 <h2>Inputs</h2> 49 <h2>Inputs</h2>
...@@ -245,7 +250,7 @@ ...@@ -245,7 +250,7 @@
245 vjsOutput.innerHTML = hex; 250 vjsOutput.innerHTML = hex;
246 251
247 // XXX Media Sources Testing 252 // XXX Media Sources Testing
248 window.vjsSourceBuffer.appendBuffer(bytes); 253 //window.vjsSourceBuffer.appendBuffer(bytes);
249 }); 254 });
250 reader.readAsArrayBuffer(this.files[0]); 255 reader.readAsArrayBuffer(this.files[0]);
251 }, false); 256 }, false);
...@@ -272,7 +277,7 @@ ...@@ -272,7 +277,7 @@
272 workingOutput.innerHTML = hex; 277 workingOutput.innerHTML = hex;
273 278
274 // XXX Media Sources Testing 279 // XXX Media Sources Testing
275 // window.vjsSourceBuffer.appendBuffer(bytes); 280 window.vjsSourceBuffer.appendBuffer(bytes);
276 }); 281 });
277 reader.readAsArrayBuffer(this.files[0]); 282 reader.readAsArrayBuffer(this.files[0]);
278 }, false); 283 }, false);
......