FFmpeg for browser and Node, powered by WebAssembly
ffmpegwasm.netlify.app
ffmpegwasm.netlify.app
Aside from the OSS licenses alone, H.264 encoders/decoders have a required patent license. Most users get around this by using an API (e.g. `<video>` tags, AVFoundation) - which means Google/Apple pay for it when they ship the decoder for Chrome/iOS. How does this project get around that requirement?
I wonder if a legal sandboxing feature could be designed, perhaps even misusing the technical words to munge the sandbox to be compatible? Misuse words like header file, Library, link, object code etcetera to make the sandbox legally compatible?
In a sense, though, that feature does exist — it’s called an HTTP request.
The is significantly different a local virtual machine, of which the JVM is one: the code is still fundamentally being distributed to the client, which triggers the release clause in the original GPL. To the best of my knowledge, nobody has ever (successfully) claimed that executing JVM bytecode releases them from their obligations under the GPL.
Has anyone here used the self-hosted version of GitHub Enterprise? Did they really reimplement git?
Edit: Apparently GitHub uses https://libgit2.org/ which is "GPLv2 with a Linking Exception" (equivalent to LGPL)
The static/dynamic linking concern seems like a red herring, as it reflects a specific technological instance of such a distinction, but in architectures that do linking differently than traditional Unix systems, it makes less and less sense.
Oh and this will never work for GPL.
I hope so. I mean, that's the only reason for GPL to exist, right? There's quite a few proprietary programs that decided to relicense as GPL in order to use a GPL library.
[1] https://opensource.google/docs/thirdparty/licenses/#restrict...
[2] https://lwn.net/Articles/478361/
[3] https://twitter.com/id_aa_carmack/status/1412271091393994754...
I think OP correctly explains the perspective of some/many/or even most authors.
Arguably, given the decline of GPL as the de facto license for OSS might indicate this viewpoint is at least an accurate perspective today and may have been the underlying truth all along. Certainly growing up I think I cared more about the concept of contributing improvements back than necessarily being able to have source to all derivative products and didn’t trust corporations to give back (I still don’t, but the situation doesn’t seem quite so serious for most projects).
Yet here is a difference between the GPL and LGPL.
A GPLed piece cannot be mixed together pieces that have incompatible licenses.
This is true even if the pieces are mixed together in a dynamic way that respects their boundaries, so that users can rebuild the GPL-ed piece from sources, make modifications, and slide the modified piece back into the combination.
This is part of the point of the GPL, and specifically that point which is relaxed by the Lesser GPL, which is called "lesser" for some ideological reason.
The point of GPL software is that it's to be used in a GPL system, where users retain modification rights to the system they've acquired, and to prevent proprietary systems from free-loading off of GPL work.
This seems to be quite at odds with the (maybe mistaken?) idea of a license that allows embedding a component without "license contaminating" the entire project, but still requires publishing changes to the component itself.
I wonder if there is a license that actually achieves that, without restricting the ability to publish to app stores?
MPL might be more what you are looking for.
They focus on open source development tools, and libraries. Not end-user software products.
This is why they reject GPL because they want to be able to use the Tools and Libraries to package up a commercial software to sell to end users.
They do not actually support the principles of Free Software, it is simply away for them to lower development costs and off shift capital expenses while getting some good PR about being "open source engaged"
It trips people up: the commercial x264/x265 license provides alternate use terms on the implementation. The implementation, however, is still protected by various patents worldwide and MPEG-LA is who you go through for access to the patent pool which is (supposed to) include payment to all of the identified patent holders.
H.264 is fine as it is literally the MP3 of Video. H.265 is a lot more complicated.
[0] Slide 10, bullet one https://www.mpegla.com/wp-content/uploads/avcweb.pdf
[1]: https://bugs.chromium.org/p/chromium/issues/detail?id=642012
[0] https://emscripten.org/docs/api_reference/Filesystem-API.htm...
[1] https://github.com/jvilk/BrowserFS
[2] https://github.com/jvilk/BrowserFS/blob/a96aa2d417995dac7d37...
<ctrl-f>Creating a Streaming Transcoder
Sad face
What browser are you using that doesn't support it? Safari?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
async headers() { return [ { source: '/', headers: [ { key: 'Cross-Origin-Embedder-Policy', value: 'require-corp', }, { key: 'Cross-Origin-Opener-Policy', value: 'same-origin', }, ], }, ] },
https://jeromewu.github.io/ffmpeg-wasm-a-pure-webassembly-ja...
It could be much faster, but it's not going to beat native without some sort of distributed behavior.
Napi (node js's native api) is a much richer API. It allows you talk to V8 & interact with javascript objects directly. So, you can create native javascript objects from native code, attach custom (hidden) properties to existing JS objects, interact with the prototype chain, create promises, make native functions which call C directly, etc. All of this stuff is (currently) way more awkward from wasm. Even just moving data across the wasm-to-javascript divide is a hassle. Wasm compilers solve it for you - but usually by adding a big chunk of generated JS.
Between that and the VM slowdown, the code I've been working with lately, wasm ends up about 3x slower than when I just run it natively.
Wasm code also can't access the native system level stuff - so, no filesystem access, no kernel APIs, etc. Though depending on who you ask, this might be a feature.
But wasm works everywhere - including in the browser, and from Python and Go. With napi you need to compile your code separately for every operating system and CPU architecture pair you want to support. This is a huge pain when publishing an npm module. With wasm its just, compile once, run anywhere. For that reason alone I wouldn't be surprised if wasm became the default recommended way to ship native modules with node soon; at least for modules which aren't super performance sensitive. And there's been talk of exposing the JS GC to wasm for a few years. Hopefully when that stuff lands, it'll get easier to marshal objects across the gap.
You don't need a Wasm GC to do this. If you only need js objects to pass on to, say, the host's function or check is null or not, then reference types that are opaque external references: https://github.com/WebAssembly/reference-types/blob/master/p...
You can even do many more things if you export `Reflect` to WebAssembly: https://github.com/AssemblyScript/assemblyscript/blob/main/t...
Reference Types are available almost everywhere already (In Safari will be available after 15.0): https://webassembly.org/roadmap
FFMpeg and gst, and the external encoder libraries, contain alot of simd optimzied code.
Any benchmarks for how the ffmpeg wasm version compares to a ffmpeg native build in terms of decoding/encoding?
Also discussed here btw:
Probably a good idea to limit the type of code they can execute.
However, it does show that wasm is a capable compilation target, which is great!
https://www.destroyallsoftware.com/talks/the-birth-and-death...
Oh wait.
I know it certainly was several years ago, and the problem was magnified by every video sharing site using it in their ingestion and transcoding pipelines. It's a single, incredibly powerful and versatile tool, to the point where it's often easier[ß] to fiddle around with command line parameters than to hit the underlying libraries directly.
And by design, in that kind of setup ffmpeg is processing vast quantities of untrusted inputs, coming in at all possible (and some impossible) combinations of video formats, container formats, invalid segment headers, bitstream corruptions and whatever else you can think of. If my memory serves me right, when M. Zalewski first joined Google, he worked on YouTube's video processing ... and to make their engine more robust, started to fuzz ffmpeg. I've heard people describe the result as if shaking a plum tree.
As a result of all these years of hardening, these days ffmpeg should be reasonably robust against malicious inputs. Now, if anyone is generating command lines for it and passing anything from user input to that - well, that's an open invitation to abuse.
ß: subjective, of course. But I've tried to look at using the libraries for something fairly straightforward and every single time it's been much more effective use of my time to just look up what the necessary ffmpeg CLI flags+arguments were.
Unity and Unreal both have HTML5 as a first-class platform, I believe.
What webasm will do for games:
- Not much for graphics, those are limited by the graphics APIs
- Maybe allow number-crunching of 32-bit floats and integers to be faster because you don't have to fight JavaScript's native types being doubles
- Reduce overhead because the runtime doesn't have to keep track of its own GC, or things like falling back to a slow interpreted path (which takes some memory, even if the fallback never happens)
- Allow stuff like Unity's C# runtime to be more efficient, since it's just running the C# runtime directly in webasm instead of using something like asm.js where it has to sit atop the larger JS runtime and its GC
It's gonna be nice. There will be complaints, and backlash, but nobody could have prevented this, and it is a benefit to many use cases.
We’re even working on WebXR support, which will play a key part in enabling the metaverse.