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. |
15th June 2011, 11:01 | #21 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Youka, thanks for this - it looks to have a lot of potential.
What would make it even more powerful and flexible would be the ability to pass in more than a single source clip. Also the ability to pass parameters to the lua script, or some way of accessing avs variables inside it (eg something like get_avs_var("x")). Are those a possibility for later versions? BTW, I have discovered that the plugin will not load on earlier versions of Windows (one of my machines is still on Win 2000, and for various reasons I don't want to upgrade it). I expect this is because it has been compiled with Visual Studio 2010 - any chance you could release a version compiled with say VS2008 or the ICC compiler? (Of course once the source becomes available, I can compile it myself.) |
15th June 2011, 11:24 | #22 | Link | |||
Registered User
Join Date: Mar 2011
Location: Germany
Posts: 64
|
Quote:
Quote:
Quote:
|
|||
16th June 2011, 00:11 | #23 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
for posting the source code.
Suppose I want to write a general Avisynth function for some effect, like say your cube example. Attributes like the cube size and rotation speed are hard-coded in the lua script file, whereas I would like to have these as parameters of my Avisynth function and somehow make them available to the lua code. |
18th June 2011, 08:18 | #24 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
Just found some OpenGL code for making custom transitions for iOS.
A YouTube video showing the transitions: http://www.youtube.com/watch?v=69Tbd...layer_embedded I'm not that familiar with OpenGL code, but the gl code looks similar to FLuaG: https://github.com/Split82/HMGLTrans...5fa5f1e#diff-3 Would it be insane to think that the actual transitions could be ported to FLuaG?
__________________
DVD slideshow GUI(Freeware). Last edited by tin3tin; 18th June 2011 at 08:26. |
18th June 2011, 16:48 | #25 | Link | ||
Registered User
Join Date: Mar 2011
Location: Germany
Posts: 64
|
Quote:
Quote:
|
||
21st June 2011, 19:53 | #27 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
@ Youka
Please, keep us posted on you development of that great plugin you're working on and thanks for working so hard on it.
__________________
DVD slideshow GUI(Freeware). |
22nd June 2011, 02:49 | #28 | Link | |||
Registered User
Join Date: Mar 2011
Location: Germany
Posts: 64
|
Quote:
- Display lists are important! Drawing convex polygons, like text, with tesselation again and again is slow. - ... - Summary: too many limits (see here). Quote:
Currently i'll just fix what i find. I'll continue when i've more time. Alternative: Quote:
Last edited by Youka; 30th June 2011 at 22:28. |
|||
30th June 2011, 22:31 | #29 | Link |
Registered User
Join Date: Mar 2011
Location: Germany
Posts: 64
|
Plans for next FLuaG version.
Release and some example videos + scripts follow next week (i hope). |
1st July 2011, 07:23 | #30 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
Good to hear that you're making progress. Looking forward to your next release.
(btw. you should proberly make a new thread on your plugin here at doom9 - your plugin can do so much more than OpenGl)
__________________
DVD slideshow GUI(Freeware). Last edited by tin3tin; 1st July 2011 at 07:27. |
1st July 2011, 09:45 | #31 | Link |
Registered User
Join Date: Mar 2011
Location: Germany
Posts: 64
|
The next version + material will start in a new thread (wish of splitting this thread was ignored ).
Extend it to other libraries than OpenGL... i think graphic is one thing. For audio there could be another plugin. |
1st July 2011, 10:00 | #32 | Link | |
Registered User
Join Date: Mar 2005
Posts: 366
|
Quote:
__________________
DVD slideshow GUI(Freeware). |
|
22nd September 2012, 15:47 | #33 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
I've been trying to put some of the stuff in this thread into practice using freeglut (a static build in this case), and I've almost, but not quite, got something that works:
Code:
#include "windows.h" #include "avisynth.h" #define FREEGLUT_STATIC #include "glut.h" #include <stdio.h> class glsynth : public GenericVideoFilter { private: void display(); public: glsynth(PClip _child, IScriptEnvironment* env); ~glsynth(); PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); }; #define RND (float)(rand()*(1.0/RAND_MAX)) void glsynth::display() { glViewport(0,0,vi.width,vi.height); glClearColor(0.0f, 0.0f, 0.0f, 0.5f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glBegin(GL_QUADS); glColor3f(RND,RND,RND); glTexCoord2f(0.0f, 1.0f); glVertex3f(-0.5, -0.5, 0.0f); glColor3f(RND,RND,RND); glTexCoord2f(1.0f, 1.0f); glVertex3f( 0.5, -0.5, 0.0f); glColor3f(RND,RND,RND); glTexCoord2f(1.0f, 0.0f); glVertex3f( 0.5, 0.5, 0.0f); glColor3f(RND,RND,RND); glTexCoord2f(0.0f, 0.0f); glVertex3f(-0.5, 0.5, 0.0f); glEnd(); glFlush(); glFinish(); } glsynth::glsynth(PClip _child, IScriptEnvironment* env) : GenericVideoFilter(_child) { if (!vi.IsRGB32()) env->ThrowError("glsynth: input must be RGB32"); char *argv[]={"foo","bar"}; int argc=2; glutInit(&argc,argv); glutInitWindowSize(vi.width,vi.height); glutInitDisplayMode(GLUT_RGBA); if (!glutCreateWindow("")) env->ThrowError("glsynth: couldn't create OpenGL context"); } glsynth::~glsynth() { } PVideoFrame __stdcall glsynth::GetFrame(int n, IScriptEnvironment* env) { PVideoFrame dst = env->NewVideoFrame(vi); unsigned char* dstp = dst->GetWritePtr(); display(); glReadPixels(0,0,dst->GetPitch()>>2,vi.height,GL_RGBA,GL_UNSIGNED_BYTE,dstp); return dst; } AVSValue __cdecl Create_glsynth(AVSValue args, void* user_data, IScriptEnvironment* env) { return new glsynth(args[0].AsClip(),env); } extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) { env->AddFunction("glsynth", "c", Create_glsynth, 0); return "`glsynth' glsynth plugin"; } It also crashed VirtualDub on exit but I'm not so bothered by that yet. David Last edited by wonkey_monkey; 22nd September 2012 at 15:51. |
23rd September 2012, 06:16 | #34 | Link | ||
Registered User
Join Date: Mar 2011
Location: Germany
Posts: 64
|
Try to remove them. Both together are senseless anyway and you don't have to flush data before glReadPixels.
Quote:
Quote:
|
||
23rd September 2012, 10:27 | #35 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Quote:
Giving the window a name doesn't make a difference and I'm not sure what you mean about the static array pointer - glutInit seems to work as it is since the plugin is correctly producing frames on a frame-by-frame basis. I guess there must be something different about the way frames are fetched when VirtualDub goes into "play" mode. David |
|
|
|