digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth script order? (http://www.digitalfaq.com/archives/avisynth/2913-avisynth-script-order.html)

hudsonhawk 03-08-2003 02:36 PM

Avisynth script order?
 
Hi,

Given the following script:

AVISource("d:\Video\Capture\Clip0001.avi")

Trim(1192,159154)
FadeIn2(30)
FadeOut2(30)
Crop(20,2,-4,-2)
Telecide()
Decimate(cycle=5)
AddBorders(0,2,0,2)
BilinearResize(352,480)
LegalClip()
Levels(14,.94,243,0,250)
Cnr2()
PixieDust()
Blockbuster(method="noise", variance=.4, seed=1)
LegalClip()

How is the order of this script? Is there anything that should be changed? The source AVI file is from a VHS cap via a DV camcorder.

Thanks in advance!

digitalize 03-10-2003 09:04 AM

You could move AddBorders as the last line. This way you are not slowing the conversion down by encoding black empty space.

sh0dan 03-19-2003 11:40 AM

Do you gain anything visually from the first LegalClip? Otherwise you might as well take it out.

Boulder 03-19-2003 02:31 PM

Also, definitely no cropping before Telecide and Decimate! They should be the very first lines after loading the clip.

muaddib 03-19-2003 05:09 PM

Hi Boulder,

MovieStacker puts just LegalClip before Telecide/Decimate, do you think it could be a problem? :roll:

kwag 03-19-2003 07:39 PM

Quote:

Originally Posted by muaddib
Hi Boulder,

MovieStacker puts just LegalClip before Telecide/Decimate, do you think it could be a problem? :roll:

I'm not Boulder, but I can answer that :)
That shouldn't make a difference. I recall SansGrip suggesting the use of LegalClip() right after the source line and at the end of the script.
It there's nothing to clip, it just won't clip anything :D

-kwag

sh0dan 03-20-2003 03:55 AM

Yes - but I see no point in capping values before processing. If anything it could add detail to the rest of the processing, for instance to be used if the brightness is tweaked in the script.

I don't know any filters that has problems with these values.

kwag 03-20-2003 09:10 AM

Quote:

Originally Posted by sh0dan
Yes - but I see no point in capping values before processing. If anything it could add detail to the rest of the processing, for instance to be used if the brightness is tweaked in the script.

In that case, it would then be an advantage :), but if no luminance/brightness, etc., filtering was to be used, not using LegalClip() at the beginning would add some extra processing to the filters under it :!: At least that's the way I see it, but correct me if I'm wrong :roll:

-kwag

sh0dan 03-20-2003 05:28 PM

In 99% - No. Processing time will be the same - for most filters don't use conditional jumps based on image information. Some filters way have slightly different algorithms based on pixeldata (C3D for instance), but adding legalclip/limiter will only change perhaps 0.05% in processing time - not much compared to the cost of using the filter. So from the speed point of view, just adding legalclip/limiter at the end of the script is the best solution.

kwag 03-20-2003 05:42 PM

Thanks for clearing that up sh0dan :)

-kwag

muaddib 03-20-2003 08:23 PM

Just to think about it a little more...
Here is what SansGrip said about why using two legal clips:

Quote:

Originally Posted by SansGrip
When encoding from an MPEG-2 source I put one instance of LegalClip directly after Mpeg2Source so that the out-of-range artifacts don't interfer with the results of other filters in the script, and then one at the very end to remove any that might have been generated during processing.


kwag 03-20-2003 09:00 PM

That's exactly what I recall, but I wasn't sure about any filter actually creating "out-of-band" levels if the filters are only processing what they are fed. So just for "protection" or "insurance" I would still use the filter on input and on output. This would ensure then the input is clipped (clamped) and also the output, just in case :!: Just my thought :roll:

-kwag


All times are GMT -5. The time now is 11:33 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.