digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: REMEDIAL SCRIPTING 101 (http://www.digitalfaq.com/archives/avisynth/6094-avisynth-remedial-scripting.html)

EightBall 10-14-2003 12:50 AM

REMEDIAL SCRIPTING 101
 
I have many questions about avisynth scripts. I'm a person who likes to know the whats and whys of how something works. It bothers me to type in a line just because someone says it works well. I do it, but I still want to know what the line means, what it does how it works.

So I'm going to start this thread, and ask my questions one line at a time.
The idea is that we can all read this thread and get a little tidbit here and there that maybe we didnt know before. Here is a script:

Quote:

###Dialhots version 3 for Divx,Xvid etc"

AviSource("movie.avi",false)
BlindPP(cpu=4)
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1)
ATC(2,3,5,0.5,false)
GripCrop(HEIGHT, WIDTH, overscan=1, source_anamorphic=false)
GripSize(resizer="LanczosResize")
Undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)
GripBorders()
####I tested it with a 480x480 target resolution. You must turn off all postprocessing done by codecs (Divx or Xvid) to use this script. That is important. ####
We Know that the # symbol means anything typed after it on the same line will be ignored. Like a rem statement, Its just a nice way to place an explanation, or a tiltle, to make the script look more professional.


The first line of the Script:
AviSource("movie.avi",false)

We are to insert the path to the Movie we are using. Because the first word is AviSource, we know that source must be an AVI. Is this correct?

Question. Are there other identifying words for other sources? I.e. MpgSource? DirectshowSource? Also, Why the ",false"? What does that do, and why is it there?

### For those who wish to jump ahead of these questions, here is the link Dialhot posted for the Avisynth manual:
http://avisynth.org/index.php?page=AviSynthManual ###

kwag 10-14-2003 01:12 AM

Re: REMEDIAL SCRIPTING 101
 
Quote:

Originally Posted by EightBall

Question. Are there other identifying words for other sources? I.e. MpgSource? DirectshowSource?

Yes. The best answer is here: Q2.8: How do I load my clip into AviSynth (video) ? http://www.avisynth.org/index.php?pa...d+frameserving
Quote:

Also, Why the ",false"? What does that do, and why is it there?
The "false" statement kills audio from the source. If it has ( or doesn't have ) audio, the source is treated like if it doesn't have audio. This is specially usefull for crappy DivX files, where the audio has been encoded as MP3 or some other format, which causes sync problems, etc.

-kwag

EightBall 10-14-2003 03:05 PM

BlindPP(cpu=4)

What does this line actually do?
The info within the brackets?

Dialhot 10-14-2003 03:19 PM

BlindPP is a filter that does a blind post processing. Blind here means that normally such pp should be done only on compressed video with DCT blocks (MPEG4 avi or MPEG1 like KVCD) but here it is done on everything handled by avisynth, uncompressed sources included.

cpu=4 is a parameter of blindPP. If you want to know what it does, you should read the documentation that is provided with the file blindpp.dll (it is generaly called "readme.txt" or "nameoftheplugin.htm"). All plugins have a documentation.

EightBall 10-14-2003 06:54 PM

Quote:

Originally Posted by Dialhot
BlindPP is a filter that does a blind post processing. Blind here means that normally such pp should be done only on compressed video with DCT blocks (MPEG4 avi or MPEG1 like KVCD) but here it is done on everything handled by avisynth, uncompressed sources included.

cpu=4 is a parameter of blindPP. If you want to know what it does, you should read the documentation that is provided with the file blindpp.dll (it is generaly called "readme.txt" or "nameoftheplugin.htm"). All plugins have a documentation

QUESTION
So, Blind Post processing, (or BlindPP) Processes both Uncompressed sources and Compressed ones such as MPEG1 Mpeg4Avi, but will also
do pure Avi? Is this correct?

QUESTION:
What is Blind PP actually doing to the video file? Or is it used mostly when we are unsure of the sourcefiles , and we wish avisynth to be able to "handle" the file regardless of type?

REQUEST:
Could you post a link to blindPP. I dont see it in Avisynths site.
I will read the documentation and post the findings here. [ assuming I understand them. :) ]

Dialhot 10-15-2003 03:25 AM

Quote:

Originally Posted by EightBall
QUESTION
So, Blind Post processing, (or BlindPP) Processes both Uncompressed sources and Compressed ones such as MPEG1 Mpeg4Avi, but will also
do pure Avi? Is this correct?

Yes it is. And in fact, with such sources, it doesn't have a lot of things to do because the defaults that are normally removed by this pp (DCT blocks) do not exit in uncompressed source :-)

Quote:

QUESTION:
What is Blind PP actually doing to the video file? Or is it used mostly when we are unsure of the sourcefiles , and we wish avisynth to be able to "handle" the file regardless of type?
BlindPP is for removing DCT blocks introduced by compression based on Discrete Cosine Transform (DCT). MPEG1, MPEG2 and MPEG4 (xvid, divx) use DCT, and you have to use blindPP when you use them as source. And you shoudln't use it with sources uncompressed or compressed with other compression method that do not introduce such artefact.

Quote:

REQUEST :
Could you post a link to blindPP. I dont see it in Avisynths site.
I will read the documentation and post the findings here. [ assuming I understand them. :) ]
No need to post what is in a documentation everyone should have read at least once :-)

I did a mistake : there is no "blindpp.dll". BlindPP is in fact included in Mpeg2Dec3.dll and you have to read the documentation for this plugin to find the hints aboutu blindPP.

Boulder 10-15-2003 03:40 AM

In fact, BlindPP could be used with a low-quality MJPEG capture :idea: I haven't tried it since the lowest I've ever gone is 18 (PicVideo). I must experiment with this, maybe a slight PP would increase the compression nicely without affecting any details.

Dialhot 10-15-2003 04:12 AM

JPEG compression uses a DCT, so MJPEG uses it also. You're right.

EightBall 10-16-2003 12:09 PM

Quote:

BlindPP is for removing DCT blocks introduced by compression based on Discrete Cosine Transform (DCT). MPEG1, MPEG2 and MPEG4 (xvid, divx) use DCT, and you have to use blindPP when you use them as source. And you shoudln't use it with sources uncompressed or compressed with other compression method that do not introduce such artefact
So, would it be correct to assume that every Avs Script which contains a
DCT line MUST contain a BlindPP line and vice versa?

Dialhot 10-16-2003 12:28 PM

Not at all. Despite it's name, DCTFilter have little to do with DCT blocks. It's a filter that use a DCT operation for other purpose and it can be use on every source.

EightBall 10-17-2003 11:44 PM

Next Line:

Blockbuster()

QUESTION:
What specifically does this do?
By the sound of it my guess is it removes blockbuster jibberish introduced/designed to prevent persons from copying old VHS movies. But thats probably totally wrong.

QUESTION
The paramaters between the brackets are telling it to do what?

EightBall 10-17-2003 11:52 PM

Quote:

Not at all. Despite it's name, DCTFilter have little to do with DCT blocks. It's a filter that use a DCT operation for other purpose and it can be use on every source.
I see. I'm confusing filters with other things.
So the DCT filter is useable on any source to improve it, and it is not being used in the original posted script just BECAUSE BlindPP was invoked earlier. Rather it is being used because it is doing some good, whether or not this particular source has DCT Blocks in it. But since we know it does have DCT Blocks because of its type (MPG4) Divx, we must use the Blindpp line in order for the script to work.

Am I getting it right?


All times are GMT -5. The time now is 10:41 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.