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

ScriptExamples

Here are some examples of basic AviSynth scripts.

Example 1: Cutting out commercials

    # This is a comment.  All lines starting with a '#' symbol are comments
    # and are ignored by AviSynth.

    # load the file "somevideo.avi" from the same directory as the script
    AVISource("somevideo.avi")

    # Trim specifies what frames to KEEP.  The following line keeps frames
    # [0, 12000], [20000, 32000], [44000, end] and then splices them
    # together, effectively removing frames [12001, 19999] and
    # [32000, 43999]
    #
    # NOTE: the interval notation [a, b] means all frames from a through b,
    #       inclusive.
    #
    Trim(0, 12000) ++ Trim(20000, 32000) ++ Trim(44000, 0)

Example 2: Resizing

    AVISource("somevideo.avi")

    # resize the dimensions of the video frame to 320x240
    LanczosResize(320, 240)

Example 3: Dubbing audio

    video = AVISource("somevideo.avi")

    # we can load WAV files too
    audio = WAVSource("music.wav")

    # mux the video and audio tracks together
    AudioDub(video, audio)

Example 4: Adjusting brightness, removing noise, fading

    AVISource("somevideo.avi")

    # TemporalSoften is one of many noise-reducing filters
    TemporalSoften(4, 4, 8, scenechange=15, mode=2)

    # increase the gamma (relative brightness) of the video
    Levels(0, 1.2, 255, 0, 255)

    # fade-in the first 15 frames from black
    FadeIn(15)

    # fade-out the last 15 frames to black
    FadeOut(15)

See Also:

SourceForge Logo

 


Edit this document | View document history
Document last modified Sun, 27 Mar 2005 08:11:58