Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
10th September 2016, 02:57 | #1 | Link |
Registered User
Join Date: Nov 2010
Posts: 11
|
vsjs - VapourSynth bindings for node.js
https://github.com/mgroshans/vsjs
I made some node bindings for VapourSynth. I don't have a lot of experience with gyp or distributing native modules for node so it probably doesn't build out-of-the-box on OSX or Linux and I don't know if it will build on anyone else's Windows box. But I wanted to post it here just to get the word out. I think this allows for some pretty neat things given the large and active javascript ecosystem. |
10th September 2016, 03:11 | #2 | Link |
Registered User
Join Date: Nov 2010
Posts: 11
|
https://github.com/mgroshans/gulp-vs2yuv is actually how the project started, allowing you to render vapoursynth scripts in a gulp pipeline, but it never really turned out to be particularly cool because most of the time you just spawn an x264 process and at that point you might as well have spawned a vspipe process too.
But a more exciting application is electron apps see http://i.imgur.com/2ahQlmk.jpg for an example. This has already been really useful to me building one-off tools. Specifically I wanted a tool that could display two scripts at once and without clicking around or alt-tabbing I wanted to go frame-by-frame in one script, or the other, or both. Starting from the basic one video electron app it only took me a couple minutes to get what I needed. Having the chrome development tools available is really powerful. I'm planning to release at least a really basic app too, but I need to clean it up some and there's a couple not-so-great bits that maybe people here have ideas to improve. I'm using a canvas to display the image, but that takes packed RGBA. The closest I can get out of vapoursynth is (for example) Code:
.resize.Point(format=vs.RGB24, matrix_in_s="170m") .std.FlipVertical() .std.ShufflePlanes(planes=[2, 1, 0], colorfamily=vs.RGB) .resize.Point(format=vs.COMPATBGR32) .set_output() Code:
for (let i = 3; i < frameBuffer.length; i += 4) { frameBuffer[i] = 255; } If anyone has alternative suggestions for how to prepare the video from the vapoursynth side or a better way to blit it on the web side I'm all ears. And of course I can add something to vsjs if need be, I just wanted to start with something as simple as possible. |
23rd September 2016, 15:52 | #3 | Link |
Registered User
Join Date: Apr 2016
Posts: 1
|
This could not have come at a better time for me, personally! I was just about to embark upon the exact same task myself, so I am very thankful for your efforts on this front.
Since you've already done the heavy lifting, I will be empowered to develop an application I've had in mind for some time now. Watch out for a message on GitHub from me, as I will be sending you my code once I am done! |
23rd September 2016, 15:59 | #4 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
|
|