Log in

View Full Version : delogo filter for avisynth?


scorchED
14th June 2002, 11:23
i used the delogo filter for Vdub, but i want to use only AVISynth becuase the final file has to be YUV2 without colorrecoding in Vdub.

So i am searching for a delogo filter for AVISynth.

i want to put 2-3 lines away from a svhs capture in the bottom of the movie. these 3 lines have fluctuating white and grey pixels. Maybe there is another solution for my problem?

thanks in advance

Wilbert
14th June 2002, 12:04
So i am searching for a delogo filter for AVISynth.

Doesn't exist. Nor is it possible to write a script for that in AviSynth (at least I looked at it a few months ago and I have no clue how to do that).


i want to put 2-3 lines away from a svhs capture in the bottom of the movie. these 3 lines have fluctuating white and grey pixels. Maybe there is another solution for my problem?

Why don't you crop four lines from below:

Crop(0,0,x-4,y) # with (x,y) original size

and add black borders if necessary:

AddBorders(0,0,0,4)

scorchED
14th June 2002, 13:28
thanks for your reply Wilbert

i didn't wanted to cut them away - i wanted to wash them out.

TactX
17th June 2002, 20:11
Listen carefully, because this method works AFAIK with any VirtualDub filter that you want to use in Avisynth and you can set-up complex filters even with preview.


1. Write your Avisynthscript to the point where you want to add your VDub-filter.

2. Open it in VirtualDub.

3. Add your filter like you always do.

4. Then "save processing settings..."

5. open the *.vcf file with an editor and search for two lines that look somehow like this:

---------------------------------
VirtualDub.video.filters.Add("DeLogo 1.2.1");
VirtualDub.video.filters.instance[0].Config(1, "500-999", "D:/2.bmp", "D:/2.bmp", "D:/1.bmp", "D:/2.bmp", 34, 56, 0,0);
---------------------------------

The first line adds the filter ("DeLogo 1.2.1" in this case)
The second line after "Config" gives you exactly the syntax that you need for Avisynth.

6. After having copied the syntax, prepare your Avisynth-script with the necessary lines:

---------------------------------
LoadVirtualDubPlugin("c:\VirtualDub-1_4_10\plugins\delogo.vdf","delogo")
ConvertToRGB32
delogo(1, "500-999", "D:/2.bmp", "D:/2.bmp", "D:/1.bmp", "D:/2.bmp", 34, 56, 0,0)
ConvertToyuy2
---------------------------------


NOTE: In the case of DeLogo I experienced a problem when the syntax was not complete, like this:

---------------------------------
delogo(1, "500-999", , , "D:/1.bmp", "D:/2.bmp", 34, 56, 0,0)
---------------------------------

Take care of this scorchED !!!

Wilbert
18th June 2002, 09:12
VirtualDub.video.filters.instance[0].Config(1, "500-999", "D:/2.bmp", "D:/2.bmp", "D:/1.bmp", "D:/2.bmp", 34, 56, 0,0);

Looks nice! I remember when I looked at it I saw one argument containing garbage, that is quite the opposite as above. I will look at it again tonight.

Wilbert
19th June 2002, 09:10
Ok, I think I know how to make that script. What I would like to know whether you can take logarithmes in AviSynth?

One of the arguments will be "pixel aspect ratio = par_X x par_Y" which is converted to 100*(log10(par_X)-log10(par_Y)). I didn't have time to try it yesterday, but maybe someone can tell me if this can be done.

Richard Berg
29th June 2002, 00:06
You can do very good de-logoing (and much much more) in Avisynth these days. Scroll down to the long post (http://arstechnica.infopop.net/OpenTopic/page?a=tpc&s=50009562&f=67909965&m=4020952194). Source is coming soon.

Wilbert
29th June 2002, 13:20
Wow, this really looks interesting (for doing analog video captures) !!! Only, I don't understand much of it. Starting from the beginning (you will have to downloadload a special version of AviSynth)

The majority of the cleanup was made by layering in a noise signal on the original MPEG stream, like this:

clip1=AVISource("combine_d2v-vfapi.avi").crop(16,0,688,576).ConvertToRGB32()noise=AVISource("noise.avs").ConvertToRGB32()clip1=clip1.Layer(noise,"add",6,0,0,use_chroma=true).Blur(-.8,0)

"Noise.avs" is a stream I made of noise by making four panels of noise in photoshop, saving them as sequential BMPs (noise000.bmp, noise0001.bmp, etc) then saving them a raw uncompressed four panel AVI (yes, I tried huffYUV for those aboout to ask. And it choked... so there). Once I had a four frame AVI, I made a 32 frame AVI by "appending AVI segment" several times in veedub. 32 frames was about all I was willing to go, as that alone takes up more than 60MB.


The file "noise.avs" will be 100000+ frames long consisting of noise.

Can someone explain this to me? What does "layering in a noise signal on the original stream" mean? Why does it reduce the noise? How do you make four panels of noise?

If I understand correctly you need to captures of the same clip (from different broadcastings). How is the second capture used?

Richard Berg
29th June 2002, 16:52
Well, the theory behind that part is covered just as well by all the discussion of ffdshow we've had recently. For purposes of just removing logos, operation of the new filters should be pretty simple.

Wilbert
29th June 2002, 18:20
Ok, thanks. It is covered in the thread http://arstechnica.infopop.net/OpenTopic/page?a=tpc&s=50009562&f=67909965&m=3890938134&r=7500925074#7500925074. If I have some more time I will certainly look at it!