4 ms·
I wonder. Could something like this be packaged as an extension and thus enable javascript-powered codecs for browsers that do not have the full set? (webm for
by yoz-y 10y ago
I wonder. Could something like this be packaged as an extension and thus enable javascript-powered codecs for browsers that do not have the full set? (webm for Safari comes to mind)
- TD-Linux 10y agoYes, in fact it's even deployed on Wikipedia: https://github.com/brion/ogv.js/ https://github.com/brion/ogv.js/
- chris_wot 10y agoSeriously, the contributions of Brion Vibber to the world are completely undersung. However, isn't this server side and not clientside?
- TD-Linux 10y agoNope, it's a clientside "polyfill of <video>", basically. Try out the demo in the page - it does all playback in Javascript and WebGL.
- dasil003 10y agoBrion gave a talk about this just a few weeks ago: https://www.twitch.tv/demuxed/v/94956075 https://www.twitch.tv/demuxed/v/94956075
- v413 10y agoOr maybe even include the wasm codec/player along with the video. Then it doesn't matter what the platform supports as long as it can run wasm.
- lisivka 10y agoWasm does not solve problem of hardware acceleration completely. Wasm reduces recompilation time on client side, which is not a big deal in this case.
- douglasfshearer 10y agoA similar idea, HLS.js [0], allows playback of HLS on platforms that do not support it natively. Open-sourced by Dailymotion, it is used by The NYTime [1] amongst others to reduce the number of video renditions they have to produce for each video. [0] https://github.com/dailymotion/hls.js https://github.com/dailymotion/hls.js [1] http://open.blogs.nytimes.com/2016/02/08/flash-free-video-in-2016/ http://open.blogs.nytimes.com/2016/02/08/flash-free-video-in...
- chris_wot 10y agoI was seriously just thinking that.
- lambda 10y agoThis is a little different than codec support, though as other replies indicate, that can be done too. This is just demuxing the stream in one format, re-muxing it in a different format, and feeding it into <video> to actually do the decoding and playback. On the other hand, something like https://github.com/brion/ogv.js/ https://github.com/brion/ogv.js/ is actually doing all of the decoding and playback in JavaScript/asm.js, using C libraries compiled with Emscripten. Anyhow, yes, it probably would be possible to package up extensions that would apply one of these automatically to <video> tags with unsupported codecs or container formats. It's just a simple matter of programming.
- bytesandbots 10y agoYes, it is possible. However, note that webm on safari will require transcoding vp8/vp9 into h.264. This is much more compute intensive than just transmuxing a flv (which has to be in h.264/aac) into another container (in this case fragmented mp4). Here is an example of playing HEVC with this method: https://strukturag.github.io/libde265.js/ https://strukturag.github.io/libde265.js/
- cpeterso 10y agoBroadway.js is Android's H.264 decoder compiled with Emscripten to JavaScript: https://github.com/mbebenita/Broadway https://github.com/mbebenita/Broadway http://mbebenita.github.io/Broadway/foxDemo.html http://mbebenita.github.io/Broadway/foxDemo.html