2009-12-10, 23:00 | Link #983 |
Member
Join Date: Jul 2007
|
Yes you could use AFX for encoding if you don't care about unnecessary color conversion...
But the Questions Kudo Shinchi aks with his little Conan avatatar are kickstarting my paranoia, because of a Conan kara that I done and that has still to be relased... *sits down with his alumnium hat and absentminded starts to draw circels in the sand* |
2009-12-19, 07:32 | Link #984 |
Junior Member
Join Date: Dec 2009
|
I have a problem when using my lead in effect. The spacing on my text is getting messed up and I cannot figure out what is doing it.
I've only been using Aegisub for about a week now so I can't really figure it out. Here's a screenshot: This is the lead-in code: Code:
Comment: 0,0:00:00.00,0:00:00.00,Romaji,,0000,0000,0000,template char,!char_counter(1)!!retime("start2syl",-1000+(ci[1]-1)*42,0)!{\an5\fad(500,0)\3c&HFFFFFF&\move(!$center-100!,$middle,$center,$middle,0,500)\fscx50\fscy50\frx180\t(0,700,0.8,\frx0\fscx100\fscy100\3c&H836C4F&)} I want the top text to be like the bottom, but with the lead-in effect. --Forgot to add that I'm keeping the text there by using this: Code:
Comment: 1,0:00:00.00,0:00:00.00,Romaji,,0000,0000,0000,template char,!retime("syl2end",-$dur,-500+syl.i*50)!{\fad(0,500)\an5\pos($center,$middle)} Last edited by mxcole06; 2009-12-19 at 08:42. |
2010-01-06, 00:53 | Link #987 |
Member
|
I see the scale effect of Ichigo Mashimaro OP by [r0r1p0p] very nice
Video http://www.megavideo.com/?d=45QMS1IN http://www.megaupload.com/?d=45QMS1IN What code can i create the shape scale up and down following line.width for once line, similar that video. I dont know how to get any value of previous line or next line to current line I tryed, it's not working (certainly! ) but i dont know how to fix Code:
!retime("line", 0, line.i+1.start_time-line.end_time)!{\an5\fscx100\fscy100\t(!line.end_time!, !line.i+1.start_time!, \fscx!100*(nextline.scale_x/line.scale_x)!)\c&H292ABC&\bord0\shad0\1a&H80\be2\pos($lcenter, $lmiddle)}{\p1}m 0 5 l 0 35 l 400 35 l 400 5 l 0 5 |
2010-01-06, 01:00 | Link #988 |
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 39
|
That's one of the few things that are impossible (or at least absurdly hard) to do in kara-templater, accessing other lines' data.
The reason is that the other lines aren't even loaded at the time the current line is being processed: One input line is read, output lines for it are generated and stored, the input line is marked as "used" and then discarded from memory, only remaining in the file. Then processing continues on the next line. What I'd suggest is simply changing the timing of the original lines to suit what you want to do. Remember that it is legal to have the last karaoke syllable on a line end before the line ends. (You can also end a line before the last syllable ends.) Another advantage of changing the timing of the lines by hand is that you can adjust it slightly for something that may give a better visual effect too. (Like, timing a transition to a beat in the music, or similar.)
__________________
|
2010-01-07, 06:09 | Link #992 |
Hagane no Renkinjutsushi
Join Date: May 2009
Location: Greece
|
Hm.. I haven't scripted much in lua but I have tried similar stuff in python (other generators)..So in order to get the info from the next line u should make a table with info from i+1 line... I will try to think of something (/me goes to start lua scripting again).
|
2010-01-08, 10:51 | Link #993 |
Member
|
Anyone know where is bug in this lua file (wind move FX)?
Code:
-- Aegisub Automation script include("karaskel.lua") script_name = "wind move" script_description = "Wind move effect" script_author = "Gormel" function wind_move(subs, config) aegisub.progress.task("Getting header data...") local meta, styles = karaskel.collect_head(subs) aegisub.progress.task("Applying effect...") local i, ai, maxi, maxai = 1, 1, #subs, #subs while i <= maxi do aegisub.progress.task(string.format("Applying effect (%d/%d)...", ai, maxai)) aegisub.progress.set((ai-1)/maxai*100) local l = subs[i] if l.class == "dialogue" and not l.comment then karaskel.preproc_line(subs, meta, styles, l) wind_move(line) maxi = maxi - 1 subs.delete(i) else i = i + 1 end ai = ai + 1 end aegisub.progress.task("Finished!") aegisub.progress.set(100) end function wind_move(line) -- local wind_move = "" local rotz = -math.random(1,4)*2 local l = table.copy(line) wind_offset = l.duration/(line.kara.n) for r = 1, line.kara.n do wind_move = wind_move .. string.format("\\t(%d,%d,\\frz%d\\fry%d)",wind_offset*(r-1),wind_offset*r ,rotz,rotz*3+10) if rotz < 0 then rotz = 0 else rotz = -math.random(1,3)*3 end end return wind_move end -- Main function to do the templating function filter_apply_templates(subs, config) aegisub.progress.task("Collecting header data...") local meta, styles = karaskel.collect_head(subs, true) aegisub.progress.task("Parsing templates...") local templates = wind_move(subs, config) aegisub.progress.task("Applying templates...") wind_move(line) end function macro_apply_templates(subs, sel) filter_apply_templates(subs, {ismacro=true, sel=sel}) aegisub.set_undo_point("Wind") end function macro_can_template(subs) -- check if this file has templates in it, don't allow running the macro if it hasn't local num_dia = 0 for i = 1, #subs do local l = subs[i] if l.class == "dialogue" then num_dia = num_dia + 1 -- test if the line is a template if (string.headtail(l.effect)):lower() == "Wind" then return true end -- don't try forever, this has to be fast if num_dia > 50 then return false end end end return false end aegisub.register_macro("Apply Wind move", "Apply Wind move", macro_apply_templates, macro_can_template) aegisub.register_filter("wind move", "", 5000, wind_move) |
2010-01-08, 19:41 | Link #996 |
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 39
|
You have two functions named "wind_move", the second one overrides the first, so the first is never used.
You then register "wind_move" as an export filter, when that filter is run it will obviously call the second wind_move function, which it was bound to, and pass a subtitles object as the first parameter. The second wind_move function assumes the first parameter is a subtitle line table and performs a table.copy() on it, and this fails because the subtitles object is not a table. Solution: Rename one of those functions. Also, please indent your code properly. It's impossible to follow currently when the indentation is all over the place.
__________________
|
2010-01-18, 04:36 | Link #997 |
Junior Member
|
Hi
Hi
I have question , how can I do make effect like this Link : http://www.youtube.com/watch?v=Mt7ml...layer_embedded beginning effecto about move form (draw) how can I do like that in template ?? Is the secret in time ?? Last edited by jnazh; 2010-01-18 at 04:53. |
2010-01-18, 04:50 | Link #998 | |
Member
|
Quote:
\move(!line.left+syl.left!, !$lmiddle+5!, !line.left+syl.right!, !$lmiddle+5!)\t(\frz-!90*(math.floor(syl.duration/300)+1)!) moving and turning, try create a code by yourself Code:
Comment: 1,0:00:00.00,0:00:00.00,H2O ED Romaji,,0000,0000,0000,template noblank,{\be1}!retime("start2syl", -250+($si-1)*30, 0)!{\an5\move($scenter, !$smiddle-20!, $scenter, $smiddle, 0, 250)\c!line.styleref.color2!} Comment: 1,0:00:00.00,0:00:00.00,H2O ED Romaji,,0000,0000,0000,template noblank,{\be1}!retime("syl", 0, 0)!{\an5\pos($scenter, $smiddle)\\c!line.styleref.color2!\t(0, !$dur/2!, \c!line.styleref.color1!)} Comment: 0,0:00:00.00,0:00:00.00,H2O ED Romaji,,0000,0000,0000,template notext,!retime("syl", 0, 0)!{\an5\fscx120\fscy120\c&H292ABC&\bord0\shad0\be2\move(!line.left+syl.left!, !$lmiddle+5!, !line.left+syl.right!, !$lmiddle+5!)\t(0, !$dur/2!, \fscx!75*(math.floor(syl.duration/300)+1)!\fscy!75*(math.floor(syl.duration/300)+1)!\t(!$dur/2!, $dur, \fscx120\fscy120))\t(\frz-!90*(math.floor(syl.duration/300)+1)!)}{\p2}m 0 3 b 0 3 0 3 0 3 b 0 3 0 3 0 3 b 14 -3 17 3 30 7 b 28 11 26 14 24 18 b 24 18 24 18 24 18 b 22 21 19 25 17 28 b 26 34 33 38 48 34 b 47 33 47 33 0 3 Comment: 0,0:00:00.00,0:00:00.00,H2O ED Romaji,,0000,0000,0000,template notext,!retime("syl", 0, 0)!{\an5\fscx120\fscy120\c&H80434B&\bord0\shad0\be2\move(!line.left+syl.left!, !$lmiddle+5!, !line.left+syl.right!, !$lmiddle+5!)\t(0, !$dur/2!, \fscx!75*(math.floor(syl.duration/300)+1)!\fscy!75*(math.floor(syl.duration/300)+1)!\t(!$dur/2!, $dur, \fscx120\fscy120))\t(\frz-!90*(math.floor(syl.duration/300)+1)!)}{\p2}m 28 32 b 31 19 37 17 33 0 l 2 49 b -4 29 6 24 8 17 l 28 32 Comment: 1,0:00:00.00,0:00:00.00,H2O ED Romaji,,0000,0000,0000,template noblank,{\be1}!retime("syl2end", 0, 0)!{\an5\move($scenter, $smiddle, !$scenter-25!, !$smiddle-20!, !line.duration-350!, !line.duration!)\t(!line.duration-350!, !line.duration!, \frz!(($si%2)*2-1)*45!\frx45\fry!(($si%2)*2-1)*45!)\c!line.styleref.color1!} |
|
Tags |
fansubbing, karaoke, software |
|
|