2013-04-19, 20:43 | Link #1 |
Junior Member
Fansubber
Join Date: Mar 2012
Location: Germany
|
LVS - my personal Overlua follower
For those who didn't discovered it in Aegisub forum already, i present my personal follower of Overlua here: LVS.
Personally i use it for typesetting, karaoke effects, image creation and some video effects. Opening AvsPMod -> writing the Avisynth script for video & LVS loading -> writing the LVS input script while refreshing AvsPMod to see the results -> encode Avisynth script. It's some Lua programming with a graphics kit, but all-in-all easier and more powerful than Overlua (and active). In comparison, some advantages:
I've already thought about writing a GUI, but using it with AvsP is comfortable enough. Maybe it could be the core of NyuFX 2... i don't know. Other plugin interfaces shouldn't be a problem and i've already implented a ffmpeg demuxer [1][2] in NyuFX 1.6, so this project could have a future I tried to write a lot of documentation, like easy usage examples, html documents and many comments in source code. Feedback would be nice and contributors are welcome. Last edited by Youkakun; 2013-04-20 at 12:18. |
2013-05-01, 02:13 | Link #3 |
Junior Member
Fansubber
Join Date: Mar 2012
Location: Germany
|
Not really.
A big set of functions, good documentations and lot of commented examples should make it much much easier to learn and use than Overlua. A folder for autoloading scripts serves as external library place, so users can extend the environment and share this way their LVS extensions. |
2013-10-06, 19:24 | Link #4 |
Junior Member
Fansubber
Join Date: Mar 2012
Location: Germany
|
LVS took his way to version v1.3, became more powerful + fast, bugs were fixed and tests made by creating typesets and karaoke effects.
One script for a simple karaoke effect could look like this: Code:
-- Parse ASS file and fill global tables ass.load("my_ktime.ass") -- Roumaji & Kanji local function roumaji_kanji(ctx, ms, line) -- Iterate through sylables for _, syl in ipairs(line.styleref.alignment < 7 and line.chars or line.syls) do -- Use characters in case of kanjis -- Set color dependent on sylable activity ctx:set_source(ms >= syl.start_time and ms < syl.end_time and g2du.red or g2du.yellow) -- Draw sylable text ctx:path_add_text(syl.x, syl.y, syl.text, ass.unpack_font(line.styleref)) ctx:fill() ctx:path_clear() end end -- Subtitle local function subtitle(ctx, line) -- Draw line text ctx:path_add_text(line.x, line.y, line.text, ass.unpack_font(line.styleref)) ctx:set_source(g2du.yellow) ctx:fill() ctx:path_clear() end -- Process frames function GetFrame(frame, frame_i) -- Create drawing context for frame local ctx = frame:get_context() -- Get frame time local ms = frame_i / VIDEO_FPS * 1000 -- Look for frame-related ASS lines for _, line in ipairs(lines) do if ms >= line.start_time and ms < line.end_time then -- Draw ASS line if line.styleref.alignment > 3 then roumaji_kanji(ctx, ms, line) else subtitle(ctx, line) end end end end More informations: Online docs Samples |
Thread Tools | |
|
|