Positions-Probleme bei Karaoke

Support zu Fansubs
Post Reply
Quattro
Pokito-Fan
Pokito-Fan
Posts: 2
Joined: 26.03.2011 14:09

Positions-Probleme bei Karaoke

Post by Quattro »

Hallo,

ich habe mal bei youtube nach einigen schönen Karaoke Templates gesucht und war überrascht, das es so viele gibt.
Nun habe ich diese probiert und sie funktionieren auch! Aber die Position bleibt nicht erhalten und auch durch das abändern des Codes
bleibt es immer noch Standmäßig unten!

Hier mal ein Code:

Code: Select all

Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,,set the maximum spacing between objects(particles) to max_space (recommend:3 - 6)  fine but heavy < 3 4 5 6 > rough but light
Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,code once,max_space = 2
Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,code syl all,fxgroup.A = (math.mod(syl.i,2) == 0)
Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,code syl all,fxgroup.B = (math.mod(syl.i,2) == 1)
Comment: 0,0:00:03.00,0:00:03.00,Default,Get Scr Resolution,0000,0000,0000,code once,xres, yres = _G.aegisub.video_size() if xres == nil  then ratio = 1 else ratio = xres/1024 x_rat = ratio end if (xres and xres ~= meta.res_x) or (yres and yres ~= meta.res_y) then _G.aegisub.debug.out(2, "Warning: script resolution %dx%d does not match with loaded video resolution %dx%d resample script resolution", meta.res_x, meta.res_y, xres, yres) end
Comment: 0,0:00:03.00,0:00:03.00,Default,Get Frame Dur,0000,0000,0000,code once,msa = _G.aegisub.ms_from_frame(1) msb = _G.aegisub.ms_from_frame(100) if msa == nil and msb == nil then _G.aegisub.debug.out(2, "Warning: Please load the video or use dummy video.Frame duration was provisionally set to 33 milliseconds. ") frame_dur = 33  else frame_dur = (msb-msa)/100 end
Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,code once,function set_temp(ref,val) temp[ref] = val return val end
Comment: 0,0:00:03.00,0:00:03.00,Default,shape,0000,0000,0000,code once,shape = {"m 5 0 b 2 0 0 2 0 5 b 0 8 2 10 5 10 b 8 10 10 8 10 5 b 10 2 8 0 5 0","m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33","m 5 0 b -2 0 -2 10 5 10 b 12 10 12 0 5 0 {\1c&HFFFFFF&\3c&HFFFFFF&} m 2 0 b 9 0 9 10 2 10 b -5 10 -5 0 2 0 "}
Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,code once,x = {} y = {} temp = {}
Comment: 0,0:00:03.00,0:00:03.00,Default,,0000,0000,0000,code syl all,t = 0 pos_x = syl.center pos_y = line.middle
Comment: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,code once,function shape2() return string.format("{\\alpha&HFF&\\t(%d,%d,\\alpha&H00&\\3a&HA0&\\bord%f} m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 {\\alpha&H00&\\t(%d,%d,\\alpha&HFF&} m -31 -23 b -38 -23 -38 -13 -31 -13 b -24 -13 -24 -23 -31 -23",dur-dur*t,dur-dur*t+1,1*ratio,dur-dur*t,dur-dur*t+1) end
Comment: 0,0:00:03.00,0:00:03.00,Default,Glitter Effects Function,0000,0000,0000,code once,function glitter(dur)  if (dur > 800) then tag =  string.format("\\t(%d,%d,\\fscx%d\\fscy%d)\\t(%d,%d,\\fscx%d\\fscy%d)\\t(%d,%d,\\fscx%d\\fscy%d)\\t(%d,%d,\\fscx%d\\fscy%d)",set_temp("time",math.random(800-800*t,dur)),temp.time+1,set_temp("size",math.random(50,100)*ratio),temp.size,temp.time+2,temp.time+100,25*ratio,25*ratio,temp.time+101,temp.time+102,set_temp("size",math.random(50,100)*ratio),temp.size,temp.time+103,temp.time+200,25*ratio,25*ratio) return tag else return "" end end
Comment: 0,0:00:03.00,0:00:03.00,Default,Bezier Effects Function,0000,0000,0000,code once,function Bezier_Move(s_time,e_time,aftimg_dur,x_blur,y_blur,acl,...) a = {...} if (j == 1) then t1 = s_time t2 = e_time dur = t2-t1 accel = acl n = #a/2 for i = 1,n*2-1,2 do x[(i+1)/2] = a[i] end for i = 2, n*2,2 do y[i/2] = a[i] end c_t = 0 maxloop(2) f_t = 1/(dur/frame_dur) end afterimage_dur = aftimg_dur if (afterimage_dur < 0 ) then afterimage_dur = 0 end pos_x, pos_y = Bezier(n,x,y,c_t) n_t = c_t + f_t n_x, n_y = Bezier(n,x,y,n_t) dist = math.sqrt(math.abs(n_x-pos_x)^2+math.abs(n_y-pos_y)^2) a_t =f_t*(max_space/dist) if (a_t > f_t) then a_t = f_t end n_t = c_t + a_t if (n_t < 1) then maxj = j + 1 end retime("presyl",t1+dur*(c_t^accel),t1+dur*(n_t^accel)+afterimage_dur) t = c_t c_t = n_t return string.format("\\move(%f,%f,%f,%f,%f,%f)",pos_x,pos_y,pos_x+x_blur,pos_y+y_blur,dur-dur*t,dur-dur*t+afterimage_dur) end
Comment: 0,0:00:03.00,0:00:03.00,Default,Bezier Effects Function,0000,0000,0000,code once,function Bezier(n,x,y,t) p_x = 0 p_y = 0 for i = 1, n, 1 do p_y = p_y + y[i] * set_temp("bern",bernstein(i-1,n-1,t)) p_x = p_x + x[i] * temp.bern  end return p_x, p_y end
Comment: 0,0:00:03.00,0:00:03.00,Default,Bezier Effects Function,0000,0000,0000,code once,function bernstein(i,n,t) return (factk(n) / (factk(i)*factk(n-i))) * (t^i) * ((1-t)^(n-i)) end
Comment: 0,0:00:03.00,0:00:03.00,Default,Bezier Effects Function,0000,0000,0000,code once,function factk(n) k = 1 if (n > 1) then for i = 2, n, 1 do k = k * i end end return k end
Comment: 1,0:00:03.00,0:00:03.00,effect,,0000,0000,0000,template,!retime("start2syl",-1000+syl.i*60,0)!{\fad(1000,0)\blur3\an5\pos($center,$middle)\shad0\bord2\1a&HFF&\3c&HFFFFFF&\fscx100\fscy100}
Comment: 2,0:00:03.00,0:00:03.00,effect,,0000,0000,0000,template multi,!retime("syl",0,300)!{\an5\pos($center,$middle)\bord2\blur3\t(0,33,\fscx120\fscy120\3c&HFFFFFF&\1c&HFFFFFF&)\t(33,$dur,\fscx100\fscy100)\fad(0,300)}
Comment: 0,0:00:03.00,0:00:03.00,effect,Bezier Curve Glitter,0000,0000,0000,template noblank notext fxgroup A,{!Bezier_Move(-800,0,syl.duration*t*2,math.random(-50,50)*ratio,math.random(-50,50)*ratio,1,$center+((j == 1) and set_temp("X1",math.random(30,50)*ratio*1.5) or temp.X1),$middle+(math.random(20,50)*ratio*1.5),$center+temp.X1+(math.random(-300,300)*ratio*1.5),$middle+(math.random(-80,80)*ratio*1.5),$center-temp.X1+(math.random(-300,300)*ratio*1.5),$middle+(-80*ratio*1.5),$center,$middle)!\an5\fscx!50*x_rat!\fscy!50*x_rat!\1c&HFFFFFF&\3c!_G.ass_color(_G.HSV_to_RGB(360*(syl.i/$syln)*t,1,1))!\shad0\blur!3*x_rat!\t(\3c&HFFFFFF&)\fad(0,300)\fr45\bord!1*ratio!!glitter(line.duration)!\p1}!shape2()!
Comment: 0,0:00:03.00,0:00:03.00,effect,Bezier Curve Glitter,0000,0000,0000,template noblank notext fxgroup B,{!Bezier_Move(-800,0,syl.duration*t*2,math.random(-50,50)*ratio,math.random(-50,50)*ratio,1,$center-((j == 1) and set_temp("X1",math.random(30,50)*ratio*1.5) or temp.X1),$middle-(math.random(20,50)*ratio*1.5),$center+temp.X1+(math.random(-300,300)*ratio*1.5),$middle+(math.random(-80,80)*ratio*1.5),$center-temp.X1+(math.random(-300,300)*ratio*1.5),$middle+(80*ratio*1.5),$center,$middle)!\an5\fscx!50*x_rat!\fscy!50*x_rat!\1c&HFFFFFF&\3c!_G.ass_color(_G.HSV_to_RGB(360*(syl.i/$syln)*t,1,1))!\shad0\blur!3*x_rat!\t(\3c&HFFFFFF&)\fad(0,300)\fr45\bord!1*ratio!!glitter(line.duration)!\p1}!shape2()!
Hier das Video bei Youtube: http://www.youtube.com/watch?v=3RD8QQOD3PM

Was muss ich tun, um meine alte Position zu behalten?
User avatar
Daynt
Pokito-Fan
Pokito-Fan
Posts: 1
Joined: 02.08.2011 13:34
Contact:

Re: Positions-Probleme bei Karaoke

Post by Daynt »

Moin ;)
Du wirst das Problem, bestimmt schon gelöst haben ;)
Aber ich erkläre es trotzdem...

Lösung:
Ändere einfach im Style-Manager den Style auf die Ausrichtung 8 (Top).

Erklärung:
Die \pos im Script ist auf $center, $middle und die Ausrichtung ist auf 5 (\an5)


War doch nicht sooooo.. schwer :)
mfg Daynt

PS. Aus Youtube Kara-fx-Scripts zu nehmen ist uncool :P Selber schreiben ist cooler ;)
Wenn du etwas Neues erschaffen willst, musst du das Alte zerstören
Youka

Re: Positions-Probleme bei Karaoke

Post by Youka »

Bevor du dich noch unbeliebt in der Karaoke-FX Szene machst:
Selbst die freigegebenen Karaoke Skripte/Templates, wie auf YouTube, sind nicht zum Kopieren + minimale Änderungen da, sondern sollen den Interessierten zeigen, wie es gemacht wird und jene inspirieren.
Leute, die einfach nur kopieren und sich nicht mal der minimalen Herausforderung stellen wollen, die Modifizierung selbst zu bewerkstelligen, stehlen einfach nur und werden keine Hilfe bekommen, da dies extrem dreist erscheint.

Es ist allerdings kein Problem, Fragen zum Karaoke-Templater zu stellen, zu lernen und die Modifizierung selbst zu machen.
Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests