At least for audio only due to performance limitations.Įxample 1: There is a test.htm page with tag, test.opus file encoded using Opus audio codec, but the web browser doesn't support Opus. So it is possible to compile FFMPEG into JS.Īnd looks like it is possible to use FFMPEG compiled into JS as a media codec and/or media container polyfill for the HTML5 / tag in a web browser to decode or realtime (on-the-fly) transcode formats that not software/hardware supported (without needing to download the entire media file before it can start playing). Using Emscripten, it is possible to compile C and C++ code into JS and compile any other code that can be translated into LLVM bytecode into JS. Luckily, there is a project called Emscripten.Įmscripten is a source-to-source compiler that runs as a back end to the LLVM compiler and produces a highly-optimizable subset of JavaScript known as asm.js that runs at near-native speed. Why WebTorrent Desktop don't use FFMPEG ( ) for decoding media formats?įFMPEG can be compiled for Mac, Windows, and Linux.įFMPEG is very interesting because it is a free and open source library that supports almost any media codec and media container.Īdding native compiled binaries to the project may be not a good idea, but as I said before, WebTorrent Desktop is a not true platform independent software, because it uses Electron that supports only Mac, Windows, and Linux.īTW, one crazy idea just came to my mind!įFMPEG is not written in JavaScript. WebTorrent Desktop app is a native app designed for Mac, Windows, and Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |