Based on LogoAway by Chris Wojdon. Interpolate over an unwanted portion of a video, such as a logo or source problem. Adaptively chooses the best direction to interpolate using a best-fit approach while minimizing dramatic gradients between unrelated parts of the frame.
Xlogo(Clip, filename, int "X", int "Y", int "ALPHA", int "T1", int "T2", int "T3", int "B1", int "B2", int "B3", \ int "WHITE", int "SIDE", int "SCENE", int "FEATHER", int "NOISE", bool "BLEND", int "FADEIN", int "FADEOUT") XlogoRBG(Clip, filename, int "X", int "Y", int "ALPHA", int "T1", int "T2", int "T3", int "B1", int "B2", int "B3", \ int "WHITE", int "SIDE", int "SCENE", int "FEATHER", int "NOISE", bool "BLEND", int "FADEIN", int "FADEOUT") clip: Input clip. filename: Filename of the first logo bitmap. Uses same naming convention as vdub version. The first file must end in 0.bmp or 2.bmp X: Horizontal position of left edge of the bitmap Y: Vertical position of top edge of bitmap ALPHA: Transparency over range 0-255. 0 gives all interpolated result, 255 gives all transparent processing result. Default is 255. T1: On the first interpolation pass any pixel for which the difference of the two source pixels exceed this threshold will not be processed. Default is 10. T2: Same as T1 but for the second pass. Default is 25. T3: The third pass is done 4 way, unless the 2 pixels differ by more than T3, in which case it reverts back to 2 way. Default is 40. B1: Number of blur passes done on the interpolated pixels that pass the first two thresholds. Default is 5. B2: Number of blur passes done on the remainder of the interpolated pixels. Default is 20. B3: Number of blur passes done on the entire bitmap area. Default is 10. WHITE: White level, used only for white transparent processing (see vdub docs) Default is 230. SIDE: Pre-Interpolates one side of the image (see vdub docs) 0 for no side, 1 top, 2 right, 3 bottom, 4 left. Default is 0. SCENE: If fewer than this percentage of border pixels have changed by T1 then the previous frame is used instead of calculating the new frame. Helps reduce flicker and decreases processing time. FEATHER: Feathers edges of bitmap blur this number of pixels. Your bitmap should be this number of pixels larger than the logo. Default is 8. NOISE: Adds random noise of this magnitude after blurring to try to make the blurring less obvious. Default is 0. BLEND: (BOOL) Blends interpolated pixels with the previous frame between 0 and 50% depending on amount of change in the border pixels from the previous frame. The greater the change the less influence the previous pixel has. Setting SCENE=0 and BLEND=TRUE should give more natural results but increase encoding time. Default is true. FADEIN: Forces ALPHA=0 starting at frame 0 for this duration. FADEOUT: Forces ALPHA=0 from last frame for this duration.
Use "c:/logo_0.bmp" at x=300, y=200, alpha=180 with all others default:
AviSource("c:/foo.avi") Xlogo("c:/logo_0.bmp", x=300, y=200, alpha=180)
Notes: For YUY2 and YV12 clips X-Logo internally processes as RGB by invoking crop to just the bitmap area, converttoRGB32(), processing as RGB, converting back to YUY2 or YV12, and then overlaying the result back on the source. This is much faster than converting the entire frame. However, if you were going to convert to RGB later anyway you aren't going to get any speed improvements from delaying it.
When making your bitmaps for transparent processing if the source is not RGB consider loading it with AviSynth and converttoRGB32() to be sure than the bitmap and the frames fed to X-Logo have been decoded from the source in the same way.
- VideoHelp - Remove an opaque logo using Xlogo in AviSynth tutorial.
Back to External Filters ←