Log in

View Full Version : Bug in v2.0x TemporalSoften?


fasttimes
17th January 2003, 04:02
I'm hving problms using layering multiple captures, with the Interleave/TemporalSoften/SelectEvery method. Here is the script:


### AVI SOURCE(S) ###
cap1=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0)
cap2=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0)
cap3=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0)
#cap4=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0)
#cap5=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0) # Trim extra frame if using 5 layers
#cap6=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0) # Trim extra frame if using 7 layers
#cap7=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0) # Trim extra frame if using 7 & 9 layers
#cap8=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0) # Trim extra frame if using 9 layers
#cap9=Trim(AVISource("[DRIVE]:\[PATH]\[FILENAME].avi"),0,0) # Trim extra frame if using 9 layers

### LAYER CAPTURES ###
#Interleave(cap1,cap2,cap3).TemporalSoften(1,255,255).SelectEvery(3,1) # 3 Layers
#Interleave(cap1,cap2,cap3,cap4,cap5).TemporalSoften(2,255,255).SelectEvery(5,1) # 5 Layers
#Interleave(cap1,cap2,cap3,cap4,cap5,cap6,cap7).TemporalSoften(3,255,255).SelectEvery(7,1) # 7 Layers
#Interleave(cap1,cap2,cap3,cap4,cap5,cap6,cap7,cap8,cap9).TemporalSoften(4,255,255).SelectEvery(9,1) # 9 Layers

Three layers works fine. However, with 5/7/9 layers, I get ghosting, because some of the source AVI end up off by one frame. With For 5 layers, I have to trim one frame off the beginning of the 5th cap. For 7 layrs, I have to trim a frame from caps 6 and 7. And, for 9 layers, I need to trim a frame from layers 7 & 8 & 9.

For testing, I used the exact same AVI file for all source AVIs, so I could not make a mistake in the source AVIs not being exactly the same.

This looks like some sort of bug in TemproalSoften.

Steady
17th January 2003, 18:40
Originally posted by fasttimes
I'm hving problms using layering multiple captures, with the Interleave/TemporalSoften/SelectEvery method. Here is the script:



### LAYER CAPTURES ###
#Interleave(cap1,cap2,cap3).TemporalSoften(1,255,255).SelectEvery(3,1) # 3 Layers
#Interleave(cap1,cap2,cap3,cap4,cap5).TemporalSoften(2,255,255).SelectEvery(5,1) # 5 Layers
#Interleave(cap1,cap2,cap3,cap4,cap5,cap6,cap7).TemporalSoften(3,255,255).SelectEvery(7,1) # 7 Layers
#Interleave(cap1,cap2,cap3,cap4,cap5,cap6,cap7,cap8,cap9).TemporalSoften(4,255,255).SelectEvery(9,1) # 9 Layers


Shouldn't it be:
SelectEvery(5,2)
SelectEvery(7,3)
SelectEvery(9,4)

sh0dan
17th January 2003, 19:23
Just as a side note - you could try 2.5.0 - temporalsoften is considerably faster in this version. Especially in mode 2, which will produce similar results with your settings.

(Always looking for beta testers :)

fasttimes
17th January 2003, 22:35
Originally posted by Steady
Shouldn't it be:
SelectEvery(5,2)
SelectEvery(7,3)
SelectEvery(9,4)


Have no clue. :confused: I was just guessing on the settings, based on known good settings for three layers. The documentation for many of the filter settings are almost incomprehensible. Docs written by programmers usually are. ;)

I'll give these settings a try!

sh0dan
17th January 2003, 22:40
When you find out something - feel free to drop by avisynth.org and help us improve the documentation. Thanks! :cool:

fasttimes
18th January 2003, 00:08
Originally posted by Steady
Shouldn't it be:
SelectEvery(5,2)
SelectEvery(7,3)
SelectEvery(9,4)


Thanks,Steady! I don't have a clue why it works, but your modified settings seem to do the job great.:cool:

Originally posted by sh0dan
When you find out something - feel free to drop by avisynth.org and help us improve the documentation. Thanks! :cool:

BlankClip / Blackness is a good example of a command that is not really well documented:

BlankClip(clip "clip", int "length", int "width", int "height", string "pixel_type", float "fps", int "fps_denominator", int "audio_rate", bool "stereo", bool "sixteen_bit", int "color")

Nowhere it I can see, have "pixel_type" or "fps_denominator" been documented in the docs that come with AVISynth. For the other options,the information is scattered throughout.

And, in general, the valid range should be listed for all options in all commands.

I'll help, where I can ;)

Steady
18th January 2003, 05:56
I am glad I could help.

Here is what the 5 clip version does:

Interleave takes a frame from each clip (Clip1-Frame0,C2F0,C3F0,C4F0,C5F0, then Clip1-Frame1,C2F1,C3F1 ...)

TemporalSoften(2,255,255) says averege all frames within a radius of 2. So it will average 5 frames together (frame-2, frame-1, frame 0, frame+1, frame+2)

You actually only want the middle of the 5 frames so:
SelectEvery(5,2) says for every 5 frames keep the middle one
0,1, 2 ,3,4

or for 7 frames:

0,1,2, 3 ,4,5,6

Wilbert
18th January 2003, 12:43
BlankClip / Blackness is a good example of a command that is not really well documented:
BlankClip(clip "clip", int "length", int "width", int "height", string "pixel_type", float "fps", int "fps_denominator", int "audio_rate", bool "stereo", bool "sixteen_bit", int "color")
Yes, you are right! BTW, "pixel_type" can be "RGB24", "RGB32", "ŸUY2" or "YV12". I would like to know what "fps_denominator" is?

sh0dan
18th January 2003, 12:48
"fps_denominator" seems to be a special option, if "fps" is not accurate enough - not sure of it's practical function though.

Wilbert
18th January 2003, 14:23
"fps_denominator" seems to be a special option, if "fps" is not accurate enough
Could you elaborate a bit, what do you mean by this? Could you give a theoretical example.

Steady
18th January 2003, 18:16
I am not sure how it works in this function but in general fps for say 29.97 fps is often specified as 30000/1001 where 30000 is the fps_numerator and 1001 is the fps_denominator.