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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th October 2017, 15:19   #2761  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
OK thank you, looked for that and it worked.

For posterity and other under-educated people like me who do this rarely, a quick web searched indicated this was how to do it.
"To use this script simply run 'install_script.bat' from a VS2017 elevated command prompt."
Code:
In Windows 10
  Open the Start menu, by pressing the Windows logo key Windows logo on your keyboard for example.
  On the Start menu, enter dev. 
  This will bring a list of installed apps that match your search pattern. 
  If you're looking for a different command prompt, try entering a different search term such as prompt.
  Choose the Developer Command Prompt (or the command prompt you want to use) and right click and run as admin.
In Windows 8.1
  Go to the Start screen, by pressing the Windows logo key Windows logo on your keyboard for example.
  On the Start screen, press CTRL + TAB to open the Apps list and then enter V. 
  This will bring a list that includes all installed Visual Studio command prompts.
  Choose the x64 vs2017 Developer Command Prompt (or the command prompt you want to use) and right click and run as admin.
edit 1: no, that only appeared to work but didn't. This did though from inside an admin cmd box
Code:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations>copy C:\Users\u\Desktop\Vapoursynth\VSNASM\VSNASM-master\na*.* .\
C:\Users\u\Desktop\Vapoursynth\VSNASM\VSNASM-master\nasm.props
C:\Users\u\Desktop\Vapoursynth\VSNASM\VSNASM-master\nasm.targets
C:\Users\u\Desktop\Vapoursynth\VSNASM\VSNASM-master\nasm.xml
        3 file(s) copied.
And also remembering to set a system environment variable (right click on "This PC", properties, "environment variables") named NASMPATH equal to the folder (with trailing slash) where you placed the downloaded nasm.exe.

Last edited by hydra3333; 8th October 2017 at 15:58. Reason: add new info
hydra3333 is offline   Reply With Quote
Old 8th October 2017, 15:21   #2762  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
This is something you have to tell the vsnasm people about. I don't write their installation instructions
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 8th October 2017 at 16:31.
Myrsloik is offline   Reply With Quote
Old 8th October 2017, 15:41   #2763  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Quote:
Originally Posted by Myrsloik View Post
This is something you have to tell the vsnasm åeople about. I don't write their installation instructions
Yes, and thank you for the info anyway, it led to a way to get it done !
hydra3333 is offline   Reply With Quote
Old 14th October 2017, 12:14   #2764  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,729
I finally upgraded to R39 from R36 I think. I'm using this kind of a part in my cleanup script to compare the changes in the luma plane between the cleaned video and the original one. With R39, I'm only getting a black screen for the frame showing the differences. What am I doing wrong? I couldn't find anything in the "possibly breaking" parts.

Code:
planes = [0]
expr = ('{median} x + y -').format(median=1<<(src.format.bits_per_sample-1))
expr = [(i in planes) * expr for i in range(1)]
result = core.std.Expr([src, finalclip], expr)
result = core.std.Levels(result, min_in=127, max_in=132,min_out=0, max_out=255, planes=0)
finalclip = core.std.Interleave(clips=[finalclip, result])
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 16th October 2017, 23:44   #2765  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Posts: 1,213
Quote:
Originally Posted by Myrsloik View Post
I already support all the avs+ formats. This is something else. I also have no intention of paying (I mean compulsory donation hahahahaha) to debug this. Or buying an nvidia graphics card for that matter.

Let the butthurt commence!
code in avisynth_compat.cpp

Code:
static void VS_CC avisynthFilterInit(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi) {
    WrappedClip *clip = (WrappedClip *) * instanceData;

    if (!clip->preFetchClips.empty())
        clip->fakeEnv->uglyNode = clip->preFetchClips.front();

    const VideoInfo &viAvs = clip->clip->GetVideoInfo();
    ::VSVideoInfo vi;
    vi.height = viAvs.height;
    vi.width = viAvs.width;
    vi.numFrames = viAvs.num_frames;
    vi.fpsNum = viAvs.fps_numerator;
    vi.fpsDen = viAvs.fps_denominator;
    vs_normalizeRational(&vi.fpsNum, &vi.fpsDen);

    if (viAvs.IsYV12())
        vi.format = vsapi->getFormatPreset(pfYUV420P8, core);
    else if (viAvs.IsYV24())
        vi.format = vsapi->getFormatPreset(pfYUV444P8, core);
    else if (viAvs.IsYV16())
        vi.format = vsapi->getFormatPreset(pfYUV422P8, core);
    else if (viAvs.IsYV411())
        vi.format = vsapi->getFormatPreset(pfYUV411P8, core);
    else if (viAvs.IsColorSpace(VideoInfo::CS_YUV9))
        vi.format = vsapi->getFormatPreset(pfYUV410P8, core);
    else if (viAvs.IsY8())
        vi.format = vsapi->getFormatPreset(pfGray8, core);
    else if (viAvs.IsYUY2())
        vi.format = vsapi->getFormatPreset(pfCompatYUY2, core);
    else if (viAvs.IsRGB32())
        vi.format = vsapi->getFormatPreset(pfCompatBGR32, core);
    else
        vsapi->setError(out, "Avisynth Compat: Only YV12, YUY2 and RGB32 supported");

    vi.flags = 0;
    vsapi->setVideoInfo(&vi, 1, node);
}
add two lines to the if-else

Code:
else if (viAvs.IsColorSpace(VideoInfo::CS_YUV420P16))
    vi.format = vsapi->getFormatPreset(pfYUV420P16, core);
gonca is offline   Reply With Quote
Old 17th October 2017, 13:17   #2766  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by gonca View Post
code in avisynth_compat.cpp

Code:
static void VS_CC avisynthFilterInit(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi) {
    WrappedClip *clip = (WrappedClip *) * instanceData;

    if (!clip->preFetchClips.empty())
        clip->fakeEnv->uglyNode = clip->preFetchClips.front();

    const VideoInfo &viAvs = clip->clip->GetVideoInfo();
    ::VSVideoInfo vi;
    vi.height = viAvs.height;
    vi.width = viAvs.width;
    vi.numFrames = viAvs.num_frames;
    vi.fpsNum = viAvs.fps_numerator;
    vi.fpsDen = viAvs.fps_denominator;
    vs_normalizeRational(&vi.fpsNum, &vi.fpsDen);

    if (viAvs.IsYV12())
        vi.format = vsapi->getFormatPreset(pfYUV420P8, core);
    else if (viAvs.IsYV24())
        vi.format = vsapi->getFormatPreset(pfYUV444P8, core);
    else if (viAvs.IsYV16())
        vi.format = vsapi->getFormatPreset(pfYUV422P8, core);
    else if (viAvs.IsYV411())
        vi.format = vsapi->getFormatPreset(pfYUV411P8, core);
    else if (viAvs.IsColorSpace(VideoInfo::CS_YUV9))
        vi.format = vsapi->getFormatPreset(pfYUV410P8, core);
    else if (viAvs.IsY8())
        vi.format = vsapi->getFormatPreset(pfGray8, core);
    else if (viAvs.IsYUY2())
        vi.format = vsapi->getFormatPreset(pfCompatYUY2, core);
    else if (viAvs.IsRGB32())
        vi.format = vsapi->getFormatPreset(pfCompatBGR32, core);
    else
        vsapi->setError(out, "Avisynth Compat: Only YV12, YUY2 and RGB32 supported");

    vi.flags = 0;
    vsapi->setVideoInfo(&vi, 1, node);
}
add two lines to the if-else

Code:
else if (viAvs.IsColorSpace(VideoInfo::CS_YUV420P16))
    vi.format = vsapi->getFormatPreset(pfYUV420P16, core);
I meant avs 2.6 since avs+ keeps changing the api. Screw that.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th October 2017, 09:47   #2767  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Last time an implementation of the Avs+-specific high bitdepth stuff was attempted, the VideoInfo API in Avs+ was kinda immature. See here and the following posts. I think the suggestions were merged into pinterf's avs+ but it's been mucked around with again after that and I think there are still some outstanding weird edge cases and other oddities. Hence VS pretends to be vanilla 2.6 when loading plugins.

Last edited by TheFluff; 18th October 2017 at 10:36.
TheFluff is offline   Reply With Quote
Old 18th October 2017, 10:33   #2768  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
The reason I confused myself is that I added avs+ support to avfs. That was a bit of a mistake due to its extreme pre-alpha state. And can you even name a single avisynth plugin that doesn't already have a port you need it for? I can't think of any...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th October 2017, 12:45   #2769  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Here are some changes I made to AvsCompat to support CS_YUV420P16 from an Avisynth+ filter.

http://rationalqm.us/misc/Vapoursynth Usage.zip

Last edited by videoh; 19th October 2017 at 00:18.
videoh is offline   Reply With Quote
Old 18th October 2017, 14:50   #2770  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
+1
hydra3333 is offline   Reply With Quote
Old 18th October 2017, 19:44   #2771  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Since the avs+ api is apparently quite stable now (nobody seems to have stated this before I asked) I'll put proper support on my todo list. Your hack is rejected since it causes a pile of interesting issues because no plugin ever handles a partial avs+ feature level properly.

2.5 compatibility may or may not disappear (it's exclusive to 32bit anyway) to make the process simpler.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th October 2017, 10:46   #2772  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by Boulder View Post
I finally upgraded to R39 from R36 I think. I'm using this kind of a part in my cleanup script to compare the changes in the luma plane between the cleaned video and the original one. With R39, I'm only getting a black screen for the frame showing the differences. What am I doing wrong? I couldn't find anything in the "possibly breaking" parts.

Code:
planes = [0]
expr = ('{median} x + y -').format(median=1<<(src.format.bits_per_sample-1))
expr = [(i in planes) * expr for i in range(1)]
result = core.std.Expr([src, finalclip], expr)
result = core.std.Levels(result, min_in=127, max_in=132,min_out=0, max_out=255, planes=0)
finalclip = core.std.Interleave(clips=[finalclip, result])
Definitely an unintended change. Will fix.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th October 2017, 13:41   #2773  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
A question:
In the Expr filter source a load-type enum appears instead of a store-type. Is it a typo? It perhaps does not matter because the condition is never true, just asking.
See here: https://github.com/vapoursynth/vapou...ilter.cpp#L799

And a comment for Expr filter documentation: the maximum number of clips is 26 instead of 3.
Now it says: "Expr evaluates an expression per pixel for up to 3 input *clips*."
pinterf is offline   Reply With Quote
Old 19th October 2017, 13:51   #2774  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by pinterf View Post
A question:
In the Expr filter source a load-type enum appears instead of a store-type. Is it a typo? It perhaps does not matter because the condition is never true, just asking.
See here: https://github.com/vapoursynth/vapou...ilter.cpp#L799

And a comment for Expr filter documentation: the maximum number of clips is 26 instead of 3.
Now it says: "Expr evaluates an expression per pixel for up to 3 input *clips*."
That code should never be reached and is probably just a leftover. It's possible some path passes a null vi but throws an error later and this makes the check easier.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 22nd October 2017, 22:56   #2775  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Proper avs+ support is mostly finished, expect test builds in a day or two. The only removed feature is mvtools compatibility since that hack was exceptionally ugly and a superior native version exists.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 23rd October 2017, 12:47   #2776  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Quote:
Originally Posted by Myrsloik View Post
Proper avs+ support is mostly finished, expect test builds in a day or two.
Thank you.

Last edited by hydra3333; 23rd October 2017 at 13:10. Reason: removed silly query about qtgmc.
hydra3333 is offline   Reply With Quote
Old 23rd October 2017, 12:51   #2777  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,729
The Vapoursynth version of QTGMC (in havsfunc) works with the VS-native MVTools. Both have their own sticky threads in this forum section.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 23rd October 2017, 21:57   #2778  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
R40-test1

It should be release quality so if you reported one of the issues go test it.

Changes:
Code:
r40:
fixed rgb output sometimes being flipped in avisource
added alpha output settings to avisource, the default is no alpha output
fixed gamma being infinite if not set in levels, bug introduced in r39
removed the hack needed to support avisynth mvtools, the native mvtools has been superior for several years now and removing the hack makes avisynth filter creation much faster
added avisynth+ compatibility
only do prefetching in avfs with vs script when linear access is detected, fixes excessive prefetching that could make opening scripts very slow
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 24th October 2017, 09:56   #2779  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Why is there a restart computer option at the end of the installer? Is it really necessary? Bad User Experience
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 24th October 2017, 10:11   #2780  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by ChaosKing View Post
Why is there a restart computer option at the end of the installer? Is it really necessary? Bad User Experience
Because a file was in use when you installed. Bad User.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.