Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
8th July 2008, 08:53 | #1 | Link |
Registered User
Join Date: Aug 2006
Location: Region 3 with NDS Encryption
Posts: 355
|
PNG image how to enable transparency ?
I have a .PNG with transparency that I am overlaying on my video, using this script:
Code:
SetMemoryMax(256) LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\kerneldeint.dll") Import("c:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avsi") C = mpeg2source("D:\EncodingStuff\VR_MOVIE.d2v") c.KernelDeint(order=0) Letterbox(2,2,0,0,0) LimitedSharpen( ss_x=2.0, ss_y=2.0, Smode=2) FFT3DFilter(sigma=3) logo = JDL_ImageSource("d:/assrender.png", fps=c.FrameRate()) Overlay(logo, x=0, y=0) |
8th July 2008, 09:39 | #5 | Link |
Registered User
Join Date: Aug 2006
Location: Region 3 with NDS Encryption
Posts: 355
|
Im using:
Code:
SetMemoryMax(256) LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\kerneldeint.dll") Import("c:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avsi") C = mpeg2source("D:\EncodingStuff\VR_MOVIE.d2v") c.KernelDeint(order=0) Letterbox(2,2,0,0,0) LimitedSharpen( ss_x=2.0, ss_y=2.0, Smode=2) FFT3DFilter(sigma=3) logo = ImageSource("d:/dtsrender.png", fps=c.FrameRate()).converttorgb32 Overlay(logo, x=0, y=0, mask=logo.ShowAlpha) |
8th July 2008, 10:12 | #7 | Link | |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
Anyway, Code:
video = ColorBars() logo = JDL_ImageSource("avisynth-logo-gears-mod.png") Overlay(video, logo, x=0, y=0, mask=logo.ShowAlpha()) If it's still not working for you, please post the PNG you're trying to use. |
|
8th July 2008, 10:36 | #8 | Link |
Registered User
Join Date: Aug 2006
Location: Region 3 with NDS Encryption
Posts: 355
|
Im using:
Code:
SetMemoryMax(256) LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\kerneldeint.dll") Import("c:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avsi") C = mpeg2source("D:\EncodingStuff\VR_MOVIE.d2v") c.KernelDeint(order=0) Letterbox(2,2,0,0,0) LimitedSharpen( ss_x=2.0, ss_y=2.0, Smode=2) FFT3DFilter(sigma=3) logo = ImageSource("d:/assrender.png", pixel_type="RGB32") Overlay(logo, x=0, y=0, mask=logo.ShowAlpha()) |
9th July 2008, 06:22 | #9 | Link |
Registered User
Join Date: Aug 2006
Location: Region 3 with NDS Encryption
Posts: 355
|
I have a problem. My script is this:
Code:
SetMemoryMax(256) LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\kerneldeint.dll") Import("c:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avsi") C = mpeg2source("D:\EncodingStuff\VR_MOVIE.d2v") c.KernelDeint(order=0) Lanczos4Resize(720,576,0,72,-0,-72) LimitedSharpen( ss_x=2.0, ss_y=2.0, Smode=2) FFT3DFilter(sigma=3) logo = ImageSource("d:/assrender.png", pixel_type="RGB32") Overlay(logo, x=0, y=0, mask=logo.ShowAlpha()) |
9th July 2008, 08:26 | #10 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
You will need to resize your logo to match the pixel aspect ratio of your source.
Code:
... logo = logo.Spline36Resize(logo.Width(), logo.Height()*4/3) ... |
9th July 2008, 14:40 | #11 | Link |
Registered User
Join Date: Jul 2007
Posts: 157
|
ImageSource doesn't work for a png? What does it say? Because I would do something like:
Code:
SetMemoryMax(256) LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\kerneldeint.dll") Import("c:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avsi") C = mpeg2source("D:\EncodingStuff\VR_MOVIE.d2v").\ KernelDeint(order=0).Letterbox(2,2,0,0,0).\ LimitedSharpen( ss_x=2.0, ss_y=2.0, Smode=2).FFT3DFilter(sigma=3).ConvertToRGB32() logo = ImageSource("d:/assrender.png",pixel_type="RGB32").AssumeFPS(c) Layer(c,logo,"add",255) Edit: Well, I see you resolved it after reading more carefully. There's more than one way to skin a cat, I suppose... maybe this could help someone though. Last edited by NerdWithNoLife; 9th July 2008 at 14:46. Reason: Misreading |
Thread Tools | Search this Thread |
Display Modes | |
|
|