Avisynth: Vertically scrolling Text?
I like to use Avisynth to add subtitles because it gives accurate control over the result.
However Avisynth does not support East Asian Fonts for subtitle. What a waste! There is a post on this topic on D9 by FredThompson: (http://forum.doom9.org/showthread.ph...threadid=60220) Below is my example of a vertically scrolling text, using some text from his post. ################################# Blanks=BlankClip(length=1, width=352, height=300, color=$000000,fps=25) V2= Blanks.BlankClip(length=2000, width=352, height=288, color=$000000,fps=25) #AliceBlue=eff7ff azure=efffff khaki2=ede275 Seashell=fef3eb snow=fff9fa function Sub(clip "clip",string "text", Int "vpos") { return clip.Subtitle( text,25,vpos,0,2000,"Bookman Old Style",25,$efffff) } S1="I'm looking for a way to" S2="create a vertically scrolling" S3="section of text. This effect" S4="is sometimes used with" S5="documentaries." S6="Essentially, I'd like to" S7="start with a pure black" S8="screen then have the text" S9="scroll from the bottom and" S10="go off the top, returning" S11="to a pure black screen." s=Blanks.Sub(s1,25).Sub(s2,50).Sub(s3,75).Sub(s4,1 00).Sub(s5,125).Sub(s6,150). Sub(s7,175).sub(s8,200).sub(s9,225).sub(s10,250).s ub(s11,275) v1=MASK(s,s) function move(clip "baseClip", clip "movingClip" , Int "value" , Int "hpos", Int "vpos") { return baseClip.Layer( movingClip, "Add", value, hpos, vpos ) } Animate(0,1500,"move",v2,v1,255,0,288, v2,v1,255,0,-800) #move upwards trim(0,830) ################################# If you want, you can make a Scrolling Text over video: ################################# ImageReader("my.jpg", 0, 0, 25, true) FlipVertical() LanczosResize(352,288).trim(1,1).loop(10*25) v2= loop(100) #make the clip longer #increase height if necessary Blanks=BlankClip(length=1, width=352, height=300, color=$000000,fps=25) #AliceBlue=eff7ff azure=efffff khaki2=ede275 Seashell=fef3eb snow=fff9fa function Sub(clip "clip",string "text", Int "vpos") { return clip.Subtitle( text,25,vpos,0,2000,"Bookman Old Style",25,$ffffff) } S1="I'm looking for a way to" S2="create a vertically scrolling" S3="section of text. This effect" S4="is sometimes used with" S5="documentaries." S6="Essentially, I'd like to" S7="start with a pure black" S8="screen then have the text" S9="scroll from the bottom and" S10="go off the top, returning" S11="to a pure black screen." s=Blanks.Sub(s1,25).Sub(s2,50).Sub(s3,75).Sub(s4,1 00).Sub(s5,125).Sub(s6,150). Sub(s7,175).sub(s8,200).sub(s9,225).sub(s10,250).s ub(s11,275) V1=s.ConvertToRGB32() v2=v2.ConvertToRGB32() v1=MASK(v1,v1) function move(clip "baseClip", clip "movingClip" , Int "value" , Int "hpos", Int "vpos") { return baseClip.Layer( movingClip, "Add", value, hpos, vpos ) } Animate(0,1900,"move",v2,v1,255,0,288, v2,v1,255,0,-1000) #move upwards trim(0,850) ################################# |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.