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 28th October 2021, 12:23   #4561  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,497
Quote:
Originally Posted by lansing View Post
What about debugging crashes. My test filter tested okay on vspipe --info but crashes on preview, what do I do?
Attach a debugger, duh. If there's no error message then your own code crashed inside the getframe function.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th October 2021, 17:26   #4562  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
I want to rotate the frame inside the filter, can I call like std.Transpose and std.FlipHorizontal in the filter?
lansing is offline   Reply With Quote
Old 28th October 2021, 17:49   #4563  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,497
Quote:
Originally Posted by lansing View Post
I want to rotate the frame inside the filter, can I call like std.Transpose and std.FlipHorizontal in the filter?
Yes, use invoke. You can look at the code of SCDetect on how to do it here:
https://github.com/vapoursynth/vs-mi...lters.cpp#L132
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th October 2021, 21:58   #4564  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
Quote:
Originally Posted by Myrsloik View Post
Yes, use invoke. You can look at the code of SCDetect on how to do it here:
https://github.com/vapoursynth/vs-mi...lters.cpp#L132
What if I want to do rotate right -> process the frame -> rotate left? It feels like doing the last rotate in the xxxFree function is too late in the process?

Last edited by lansing; 28th October 2021 at 22:19.
lansing is offline   Reply With Quote
Old 28th October 2021, 22:54   #4565  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,497
Quote:
Originally Posted by lansing View Post
What if I want to do rotate right -> process the frame -> rotate left? It feels like doing the last rotate in the xxxFree function is too late in the process?
Use createVideoFilter2() and then simply call invoke on the node returned from there. Same idea.

Not the best example but few places do this in the VS code (see unpackRGB32Create):
https://github.com/vapoursynth/vapou...ompat.cpp#L897
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 29th October 2021, 00:07   #4566  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
Quote:
Originally Posted by Myrsloik View Post
Use createVideoFilter2() and then simply call invoke on the node returned from there. Same idea.

Not the best example but few places do this in the VS code (see unpackRGB32Create):
https://github.com/vapoursynth/vapou...ompat.cpp#L897
So the structure would be like this?

Code:
static const VSFrame *VS_CC firstGetFrame() {}

static const VSFrame *VS_CC finalGetFrame() { 
    return frame;
}

void VS_CC filterCreate() {

    d.node = vsapi->mapGetNode(in, "clip", 0, 0);
    // call invoke on node
  
    VSNode * node2 = vsapi->createVideoFilter2(firstGetFrame, freeFunc1, data);

    // call invoke on node2

    d.node = node2;

    vsapi->createVideoFilter(finalGetFrame, freeFunc2, data);   
}
lansing is offline   Reply With Quote
Old 29th October 2021, 00:20   #4567  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 73
from boxblur
https://github.com/vapoursynth/vapou....cpp#L294-L307
Yomiko is offline   Reply With Quote
Old 29th October 2021, 04:44   #4568  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
I'm seeing two patterns from the examples above about chaining invoke, it got me confused:
Code:
#1:
invmap2 = vsapi->invoke(stdplugin, "Trim", invmap);
...
vsapi->mapConsumeNode(invmap, "clipb", vsapi->mapGetNode(invmap2, "clip", 0, nullptr), maAppend);
...
invmap2 = vsapi->invoke(stdplugin, "PlaneStats", invmap);


#2
vsapi->createVideoFilter(vtmp2, "BoxBlur", xxx);
vtmp1 = vsapi->invoke(stdplugin, "Transpose", vtmp2);
In the first example, after the first invoke, the resulting node has to be consumed into a new map before pluging it into another invoke.

But in the second example, the resulting map just go straight to an invoke without the node consume?
lansing is offline   Reply With Quote
Old 29th October 2021, 09:41   #4569  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,497
Sometimes thebmap returned from invoke has the right contents and then it can be passed to invoke immediately. If it doesn't you have have to do more map manipulation.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 30th October 2021, 05:17   #4570  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
Quote:
Originally Posted by feisty2 View Post
ShufflePlanes should automatically strip the "_Matrix" property if the target color family is vs.GRAY. otherwise an error message pops up bitchin' about "no _Matrix stuff allowed for GRAY" or whatever and you have to manually remove the "_Matrix" thingy before ShufflePlanes which is very annoying.
I just encountered this annoyance, is there a better solution now?
lansing is offline   Reply With Quote
Old 30th October 2021, 06:40   #4571  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
Format conversion from a Shuffleplanes causes a shift in chroma?

Code:
clip = yuv_clip
clip = core.std.ShufflePlanes(clip, 0, colorfamily=vs.YUV)
#clip = core.resize.Point(clip, format=vs.YUV444P8)    // no shift 
clip = core.resize.Point(clip, format=vs.YUV420P8)    // chroma shift
lansing is offline   Reply With Quote
Old 30th October 2021, 14:51   #4572  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 73
Point (nearest neighbor) is supposed to be like that. It never blends neighboring pixels.
Yomiko is offline   Reply With Quote
Old 30th October 2021, 15:32   #4573  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
Quote:
Originally Posted by Yomiko View Post
Point (nearest neighbor) is supposed to be like that. It never blends neighboring pixels.
There's a shift with all other resizers too. And I thought for format conversion purpose, all the resizers should be the same?
lansing is offline   Reply With Quote
Old 30th October 2021, 17:20   #4574  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,904
Quote:
Originally Posted by Myrsloik View Post
An option to disable auto loading is probably coming soon. With more exciting things as well.
Any news in this regard?

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th October 2021, 23:04   #4575  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,643
When extracting RGB planes from a RGB clip, Shuffleplanes is outputting the wrong clip if I set the "colorfamily" to YUV

Code:
rgb_clip = core.resize.Point(clip, matrix_in_s="709", format=vs.RGB24)
clip = core.std.ShufflePlanes(rgb_clip, 0, colorfamily=vs.YUV)
I was expecting to get a yuv clip of a grayscale, but this output a yuv clip of green and pink.
lansing is offline   Reply With Quote
Old 31st October 2021, 12:27   #4576  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,744
Is there a replacement for https://github.com/AmusementClub/VapourSynth-EEDI2CUDA ? ( repo was deleted)

If not then I will remove it from vsrepo.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 31st October 2021, 12:39   #4577  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
https://github.com/kedaitinh12/VapourSynth-EEDI2CUDA

but i'm not sure if is updated
__________________
[AUR] Vapoursynth Stuff
[AUR] Avisynth Stuff
sl1pkn07 is offline   Reply With Quote
Old 31st October 2021, 13:10   #4578  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,744
No releases
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 31st October 2021, 13:46   #4579  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 1,639
Here: https://github.com/kedaitinh12/Vapou...2CUDA/releases

And i ain't a developer, if anyone have attention that project can folk them
kedautinh12 is offline   Reply With Quote
Old 1st November 2021, 10:08   #4580  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,619
I guess that means: If anyone wants to maintain this project, please fork it.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH 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 16:24.


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