tin3tin
10th December 2007, 14:58
Here's an countdown leader for anyone who might need it :)
# countdown(width, height, fps, font size)
#By Tin2tin
countdown(720,576,25,400)#example
function countdown(int c_width, int c_height,float c_fps, int c_size)
{
a=blankclip(int(c_fps*10), c_width, c_height, fps=c_fps, stereo=true, audio_rate=48000)
b=blankclip(1, c_width, c_height, fps=c_fps, stereo=true, audio_rate=48000,color=$FFFFFF)
a=a.subtitle("AVISYNTH", align=5, first_frame=0, last_frame=0,size=int(c_size/4), font="Arial", text_color=$FFFFFF)
a=a.subtitle("10", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=1, last_frame=1,size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 9", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps+1), last_frame=int(c_fps+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 8", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*2+1), last_frame=int(c_fps*2+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 7", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*3+1), last_frame=int(c_fps*3+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 6", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*4+1), last_frame=int(c_fps*4+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 5", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*5+1), last_frame=int(c_fps*5+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 4", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*6+1), last_frame=int(c_fps*6+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 3", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*7+1), last_frame=int(c_fps*7+1),size=c_size, font="Arial", text_color=$FFFFFF)
b=b.subtitle(" 2", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=0, last_frame=0,size=c_size, font="Arial", text_color=$000000)
a=a.trim(0,int(c_fps*8+1))+b.trim(1,1).audiodub(tone(0.05, samplerate=48000))+a.trim(int(c_fps*8+2),int(c_fps*10))
return a
}
# countdown(width, height, fps, font size)
#By Tin2tin
countdown(720,576,25,400)#example
function countdown(int c_width, int c_height,float c_fps, int c_size)
{
a=blankclip(int(c_fps*10), c_width, c_height, fps=c_fps, stereo=true, audio_rate=48000)
b=blankclip(1, c_width, c_height, fps=c_fps, stereo=true, audio_rate=48000,color=$FFFFFF)
a=a.subtitle("AVISYNTH", align=5, first_frame=0, last_frame=0,size=int(c_size/4), font="Arial", text_color=$FFFFFF)
a=a.subtitle("10", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=1, last_frame=1,size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 9", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps+1), last_frame=int(c_fps+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 8", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*2+1), last_frame=int(c_fps*2+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 7", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*3+1), last_frame=int(c_fps*3+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 6", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*4+1), last_frame=int(c_fps*4+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 5", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*5+1), last_frame=int(c_fps*5+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 4", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*6+1), last_frame=int(c_fps*6+1),size=c_size, font="Arial", text_color=$FFFFFF)
a=a.subtitle(" 3", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=int(c_fps*7+1), last_frame=int(c_fps*7+1),size=c_size, font="Arial", text_color=$FFFFFF)
b=b.subtitle(" 2", int(c_width/2)-int(c_size/2), int(C_height/2)-int(c_size/2), first_frame=0, last_frame=0,size=c_size, font="Arial", text_color=$000000)
a=a.trim(0,int(c_fps*8+1))+b.trim(1,1).audiodub(tone(0.05, samplerate=48000))+a.trim(int(c_fps*8+2),int(c_fps*10))
return a
}