Trouble logging in?If you can't remember your password or are having trouble logging in, you will have to reset your password. If you have trouble resetting your password (for example, if you lost access to the original email address), please do not start posting with a new account, as this is against the forum rules. If you create a temporary account, please contact us right away via Forum Support, and send us any information you can about your original account, such as the account name and any email address that may have been associated with it.

For the last couple of days I've worked on a new tool primarily intended to make karaoke production harder and more painful, but also able to produce much more advanced (ie. over-the-top, ugly etc.) effects and I think it's reached a state where it's ready for public consumption now.

I've already announced it and posted several versions on the Aegisub forum.

The tool's name is OverLua and it's function can best be described as Lua scripting to paint on video frames. It works as an Avisynth filter that calls a Lua script for every video frame requested.

I shouldn't need to say this, but I'll say it anyway: This tool is very hard to use correctly and requires a lot of programming experience. Also it's still very alpha-quality-like, buggy and incomplete, yet still useful enough to produce actual effects.

Sorry, I don't have any interesting screenshots of OverLua in action yet.Update: Now I do have a somewhat interesting screenshot, see below. But to get you started, here's some very hacky code to read an ASS file with karaoke timing:

If you wonder, you'll have to hard-code the ASS file name in the Lua script, at least for now.

Spoiler for Screenshot:

So here's a screenshot of the graphics produced by the 'test4.lua' script:
Of course you can do much more than this shows, it's just a little taster
What's shown here: Gaussian blur; the outer border of the text is strongly blurred. Actually it's two offset borders slightly overlapping and blurred afterwards. A copy of the original video frame is taken, blurred and used as fill for the text. Finally a dark red and very transparent red fill is laid over the text, darkening and reddening it.

If you want to test this out, please do so. I'm also very open to suggestions for improvements and new features. (The C++ source is also included so you can hack at it if you want. It's GPL 2.)

Also, I will only answer questions if they show that the person asking clear knows what (s)he is doing and the question is well asked. I'm not going to teach anyone programming. (If the above sample code looks completely alien to you you're probably not in the target user group for OverLua.)

Another small sample (adapted from the included test2.lua file) to round off. This code simply draws a variably blurred triangle on the video.

Hmm, now THIS is something that could theoretically turn into a legal substitute for After Effects. However, without a GUI interface it's useless for anything other than extreme masochists.

But it seems like one could take this as a backbone and write a GUI interface without too much trouble. If you add in some motion tracking code and iteration... Well, it would be powerful enough to do a lot of things that After Effects could do.

It can't request frames for processing and I don't think OverLua itself would be the most suitable platform to implement motion tracking through. What you could do, however, was have an external tool perform the motion tracking and store the result to a file which an OverLua script could then read in.

By the way, I've checked the source into the Aegisub SVN repository now if anyone feels like following development from there Also 0.6 should soon be ready.
I introduced a bad bug in 0.5 actually, where the RGB24-surface-onto-video-frame composition fails completely. (And the ARGB32 composition might also be broken, but more subtly.)

Edit: Posted version 0.6 now. It fixes a bunch of bugs and introduces two new features: VFR support (in the Avisynth filter - translate frame numbers to timecodes using a Matroska timecodes file) and a parameter that passes a freeform string (eg. path to an ASS file) to the Lua script. See the Aegisub forum for details.

for i = 0 , w do
for j = 0,h do
--[[ I really don't know why I'm doing this >< ....
if I didn't test every pixel , the script never run , at the same time , it's no diffrent
if I test "r" , "g" or "blue" .....they all give me what I want ....
well , Idon't care , since it work fine ]]

You will want to use two surfaces for it, one temporary for the source and then the destination.

Drawing pixel dots is probably better done with eg. ctx.rectangle(x-0.5, y-0.5, x+0.5, y+0.5). The 0.5 things are because of the pixel grid model cairo uses. Whole coordinates mark the center of a pixel and so the "grid between the pixels" is at +/- 0.5.

Remember that cairo ARGB32 surfaces use premultiplied alpha. This means that if you have a pixel that is 100% red but 75% alpha it will get stored as 75% red, and in turn that 0% alpha will mean the pixel gets stored as black no matter what.

I haven't actually tried to make that effect with "text split into dots that spread apart" but I have a general idea of how to do it. First, you of course need a function to model the spreading, depending on how you want it to look. The gif you posted seems to use a kind of "drops in water" spreading model, which will probably need to be pre-calculated in some way.
Depending on how large the dots should be, instead of pixel a colour from the source surface (which has the simple rendered text) and then drawing on the target, it might be a better idea to use the source surface as a pattern for the drawing on the target, and displacing it as required.

Maybe I should push a new binary out soon... I've added a few (just two, actually) functions that might be interesting but I'm not entirely sure yet.

how do i apply the effect created to a .ass, i am still a little uncertain, can you modify test4.lua and show/send me how it would look? I just get the filepath showing in the video so i assumed it had to be a problem with the lua file obviously.

how do i apply the effect created to a .ass, i am still a little uncertain, can you modify test4.lua and show/send me how it would look? I just get the filepath showing in the video so i assumed it had to be a problem with the lua file obviously.

OverLua doesn't apply anything to .ass files. It's a method to use Lua scripting to draw things on video; currently it does the drawing through Avisynth since it's only implementation is as an Avisynth plugin.

Coincidentally, you can write a script that parses an .ass file and draws the text (with or without fancy effects) on the video, but the .ass file has nothing to do with the drawing itself. If you wanted to you could just as well put the text you want to draw in the Lua script itself in some sort of data structure but that would be kind of dumb.

__________________

| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read

Would OverLua carry any of the negative effects of VSFilter, like crazy dots, artifacts or crashing, if the Lua script outputs something too crazy? Since it's different from how VSFilter draws things out, I wouldn't think so, but are there any?

Would OverLua carry any of the negative effects of VSFilter, like crazy dots, artifacts or crashing, if the Lua script outputs something too crazy? Since it's different from how VSFilter draws things out, I wouldn't think so, but are there any?

It does not have any known rendering bugs, no. Note that Overlua itself only does some specific raster operations; all the vector drawing is done with the rather well established and well tested open source library Cairo.

__________________

| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read

To a very large extent, the quality of graphics rendered using OverLua depends entirely on the effects programmer, ie. you.
It's quite possible to write some code that renders totally distorted images or just starts some infinite allocation (eventually crashing the process.)

Think of OverLua as a gun turret that tracks your feet until you understand the mechanism to install a new tracking program, to use a classic (and already overused) analogy.

I agree this may sound weird, but OverLua is extremely hard to use correctly, until you fully understand the logic in it, then it becomes very straightforward to use.
Myself, I find it blindingly obvious why things should be done the way I designed OverLua to be used, but at the same time I can (mostly) understand why many people won't easily understand the concepts.

What you're doing here is very interesting from an Avisynth perspective too.

Drawing of vectors over video is very nice. Is it possible to load images/video as is now? I've tried, but so far unsuccesfully. It would be very useful for ex. coding an antialiased pan, zoom and rotate script(Ken Burns) for Avisynth.

Is is still beeing developed? CheesyFX - is that a joke?

Anyway if you want testers for functions outside the subtitle functions - you might want to bang the drum for this fine project over at the Avisynth'er hangout: forum.doom9.org.

Nah, nothing new happened here for a long time. I don't expect anything to happen soon. I still want to do CheesyFX, but differently. (As a subtitle renderer that uses Lua scripts as the subtitle file format. Based on Kumaji. When I get around to do that.)

Technically, if you implement the image reading completely in Lua, it's possible, but not something you'd want to do. There's no library functions to do it.
Of course any video filter I make would be get an Avisynth interface, it's just about the most convenient way to both use and test things.