Dr.Khron
11th April 2007, 18:40
I'm not very good with my AviSynth syntax, and I have a few questions.
I started with a script from StickBoy that I found with a search on Logos.
Something like this should work. It sticks the specified logo in the bottom-right corner and fades it out. You can use FadeIO if you want to fade in and fade out. If you want to put it in the middle of some source clip, use Trim on the source to cut on the middle section, apply the logo, and splice it back in. (Let us know if you any questions about how to do that.)
Anyway, this is what I came up with:
# Load D2V project file
DGDecode_mpeg2source("D:\source.d2v")
#Deinterlace
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)
# Denoise: Minimal Noise
Undot()
# Assign name to work in progress
SRC = last
# Load Logo
logo = JDL_ImageSource("D:\Logo\Logo.jpg", fps=SRC.FrameRate())
# Load LogoMask and set fadein/fadeout
logoMask = JDL_ImageSource("D:\Logo\LogoMask.jpg", fps=SRC.FrameRate())
logoMask = logoMask.Loop(103).fadein(10)
# Break SRC up into 3 pieces
P1 = trim(SRC, 0,50)
P2 = trim(SRC,51,153)
P3 = trim(SRC,154,0)
# Overlay Logo & LogoMask
OL = Overlay(P2, logo,
\ x=(P2.Width() - logo.Width() - 0),
\ y=(P2.Height() - logo.Height() - 0),
\ mask=logoMask, opacity=1.0)
# Stitch back together
P1 + OL + P3
Seems to work well, but I would appreciate any suggestions for how to improve/simplfy this?
Also, I wasn't sure if my use of "<variablename> = Last" was acceptable... How else do you assign a clip name to the work in progress?
I started with a script from StickBoy that I found with a search on Logos.
Something like this should work. It sticks the specified logo in the bottom-right corner and fades it out. You can use FadeIO if you want to fade in and fade out. If you want to put it in the middle of some source clip, use Trim on the source to cut on the middle section, apply the logo, and splice it back in. (Let us know if you any questions about how to do that.)
Anyway, this is what I came up with:
# Load D2V project file
DGDecode_mpeg2source("D:\source.d2v")
#Deinterlace
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)
# Denoise: Minimal Noise
Undot()
# Assign name to work in progress
SRC = last
# Load Logo
logo = JDL_ImageSource("D:\Logo\Logo.jpg", fps=SRC.FrameRate())
# Load LogoMask and set fadein/fadeout
logoMask = JDL_ImageSource("D:\Logo\LogoMask.jpg", fps=SRC.FrameRate())
logoMask = logoMask.Loop(103).fadein(10)
# Break SRC up into 3 pieces
P1 = trim(SRC, 0,50)
P2 = trim(SRC,51,153)
P3 = trim(SRC,154,0)
# Overlay Logo & LogoMask
OL = Overlay(P2, logo,
\ x=(P2.Width() - logo.Width() - 0),
\ y=(P2.Height() - logo.Height() - 0),
\ mask=logoMask, opacity=1.0)
# Stitch back together
P1 + OL + P3
Seems to work well, but I would appreciate any suggestions for how to improve/simplfy this?
Also, I wasn't sure if my use of "<variablename> = Last" was acceptable... How else do you assign a clip name to the work in progress?