Home
RecentChanges

Search:

» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Download
»Learn to script
»FAQ
»Manual
»Discussion fora
»Project page
»External filters
»FeedBack

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth

 

Avisynth 
Logo

VScrollTitle

Hope you find this useful. If you want scrolling 'credits' you'll need to set the start frames

manually for each row of text. Note that these are all centred by default.

    #----------------------------------------------------------------------#
    # VScrollTitle                                                         #
    #----------------------------------------------------------------------#
    # V0.0                                                                 #
    #                                                                      #
    # Insert a subtitle that scrolls from (below) the bottom to (above)    #
    # the top of the frame. The total time for the scroll is given in      #
    # seconds in parameter "Time"                                          #
    #----------------------------------------------------------------------#
    function VScrollTitle( clip    Clop, \
                           int     StartFrame, \
                           string  Title, \
                           string  Font, \
                           int     FontSize, \
                           int     Colour, \
                           int     Time ) {

        ef = StartFrame + int( Time * Clop.FrameRate )
        return Animate( Clop, StartFrame, ef, "subtitle",\
        Title, Clop.width/2, int(Clop.Height*1.2), StartFrame, ef, Font, FontSize, Colour, 0, 5, 0,\
        Title, Clop.width/2,                    0, StartFrame, ef, Font, FontSize, Colour, 0, 5, 0)
    }

Example application. This was written for a 25fps avi - start frames may need to be adjusted for another frame rate, but the scroll time will stay at 5 seconds.

clip = AVISource("blah.avi")
sf = 50
clip = clip.VScrollTitle( sf, "The End", "Uncial", 48, $ffffff, 5 )
clip = clip.VScrollTitle( sf+15, "Directed by", "Arial", 14, $ffffff, 5 )
clip = clip.VScrollTitle( sf+24, "nkotb", "Arial", 24, $ffffff, 5 )
clip = clip.VScrollTitle( sf+40, "Produced by", "Arial", 14, $ffffff, 5 )
clip = clip.VScrollTitle( sf+49, "nkotb", "Arial", 24, $ffffff, 5 )
return clip

If you change the font / size the start frames will need tweaking.

Back to ShareFunctions

SourceForge Logo

 


Edit this document | View document history
Document last modified Sat, 21 Jun 2003 17:17:57