-
-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[announcement] libvlc wrapper for node.js/io.js #208
Comments
@mafintosh I come here to shamelessly advertise. But only because this is crazy useful and I believe this project is mad science and you might be interested. Basically, it initializes a raw array (Uint8Array) in the JS side, and it makes libvlc draw directly into it. Then, you put this array in a texture and draw it on the screen. It's a tiny bit less efficient than VLC, because of Chromium's (and by extension NW/Electron) multi-process architecture, where textures have to be sent through shared mem to the GPU process, and because we don't have PBO's in OpenGL ES. |
@jaruba also is there anyway to not require vlc being installed? can i statically embed it somehow into my electron project? |
Yes you can! Just add the vlc binaries (depending on what OS you are using) in the same folder as VLC v2.2.1 Binaries Links: Download VLC for Mac |
Also, if you don't want to use wcjs-player (demo app), you can just use wcjs-renderer (demo app) and build your own player from scratch. Keep in mind, the Player and the Renderer have 2 different APIs: |
@mafintosh on OS X, some symlinks are required to make embedded VLC work, so the easiest way to do it is to download our package (courtesy to @RSATom) and unzip it in the proper directory Download: https://dl.dropboxusercontent.com/u/3810814/libvlc_2.2.1_mac.zip And then
|
just little note about VLC binaries mentioned above:
But it's possible use vanilla VLC with |
About the AVI fix, it is related to libvlc not detecting length of avi files over network at all, because the demuxer wants the input to be what they call FASTSEEK to read length, and the fix is in this repo: https://github.com/Ivshti/vlc-2.2. We have to make pre-build packages for WC.js + this VLC build (or original VLC build with replaced libavi_plugin), but we haven't gotten round to it. |
this is so cool! great job guys. btw i just released prebuild yesterday if you need something for doing node prebuilds |
This looks super cool! We've been talking about how we'd like something like this and now you guys did it. |
@mafintosh, @freeall Thanks! We just hoped it could be useful to community :) |
@mafintosh @freeall we have to give you a heads up for implementing this in Playback - when a frame is rendered, wc.js calls a callback "onFrameReady" or emits event, which you have to use to render the frame through webgl (wcjs-renderer). In both cases, it relies on the JS event loop, which means if there's something blocking it, frame rendering may be delayed. @jaruba has observed regression in Powder Player and I have in Stremio, when using WC.js with Torrent-stream. torrent-stream itself is very good with not blocking the event loop - but since it does a lot of memory buffer-related operations (networking, writing to FS, etc.) V8 takes a lot of time in garbage collecting and allocations, which actually blocks the main loop. Keep in mind the way to avoid this issue is by using another process - either through node.js's fork or electron's IPC. |
hello don t understand how embedding vlc works ?? :p i downloaded vlc 2.2 for linux from vlc-prebuilt github of ivshti then ? (tried to extract it aside of webchimera.js.node but i don t know if it works... (same avi bug with streams) thanks |
We at WebChimera believe in borderless video support for developers, as such there was clearly a need for VLC to join the wonderful world of Node.js/io.js.
Announcing WebChimera.js, a libvlc wrapper for Node.js/io.js that is extremely fast and supports overlaying HTML elements. Please make sure to read the wiki page carefully for detailed instructions.
We've also started a WebChimera.js Player project (see api docs) in an attempt to create a programmer friendly, easy-to-use HTML player for WebChimera.js
These projects are made mostly with JavaScript but are atm extremely new, we require testers for all platforms and contributors so the projects can reach maturity faster.
Screenshot of Webchimera.js Player:
@mafintosh I'm not sure if I am allowed to post announcements on the issues page and I wish no ill will but I believe these new projects are important for the
peerflix
/torrent-stream
community and that we need it's help in order to test most use case scenarios. If you think this should not be here please feel free to close the issue. :)The text was updated successfully, but these errors were encountered: