PDA

View Full Version : Convert RGB<-->YV12 in AviSynth 2.5.1


YY1020
23rd June 2003, 16:32
Can anybody one ask me how to convert it??
I don"t know how to script in avsfile and need to load plugin in it??
thx for help!!

neuron2
23rd June 2003, 16:45
www.avisynth.org

YY1020
24th June 2003, 11:22
oh.......i really not understand it........can you sript one time let me see??

bilu
24th June 2003, 11:54
http://www.avisynth.org/index.php?page=Convert


It's all there, what's your question?


Bilu

YY1020
26th June 2003, 13:25
The Avs file text under there.Can anybodyone tell me script in where?I don't know script in where...........and if i use mpasource to add mp3 in avs file,how to script?
I'am a Newbies,hope can teach me!!!!!(Because my English is not good!!)

ConvertToYV12(clip, interlaced=true)---->clip means what??


#
# PLUGINS
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\Convolution3d.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\TomsMoComp.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\VSFilter.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
#LoadPlugin("C:\Plugin\mpasource.dll")
#
# SOURCE
avisource("C:\v2.avi")
#MPASource( "C:\Ready\OP\OP154(A).mp3", normalize = false)
#
# TRIM
#trim(startframe,endframe)
#
# IVTC
#Telecide(guide=1).Decimate(5)
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
#
# CROPPING
#crop(0,0,640,480)
#
#
# SUBTITLES
vobsub("XX.ssa")
#
# RESIZING
#BicubicResize(640,480,0,0.5)
#
#

bilu
26th June 2003, 13:38
Allways do deinterlacing before any sort of filtering in the video, except cropping.

Allways do colorspace conversion before the filter that needs that specific colorspace. Not necessarily immediatly before.

In this case you should use ConvertToYV12(interlaced=true) before the deinterlacing filters that require YV12. Or ConvertToYV12() only if you need it for other filters than the deinterlacers.


Never used MPASource, I mux after encoding.

neuron2
26th June 2003, 13:46
Originally posted by YY1020
ConvertToYV12(clip, interlaced=true)---->clip means what??
'clip' identifies the clip to be operated upon by the filter. It is optional to specify it and often it can be omitted. Why? Here's what Ben wrote one time:

-----
1. The statements in a script (or function) are evaluated one by one. If the value of a particular statement happens to be a clip, then it's assigned implicitly to the special variable "last", so that it's still available on the next line.

2. If a filter expects a clip as its first argument, and you haven't supplied that clip [as a parameter], then it's taken from the "last" variable.

3. The return value of a script (or a function) is the value of its final line, unless you have an explicit "return".
-----

So, you can say this in verbose fashion:

a=AviSource("movie.avi")
b=Filter(a, ...)
return b

or you can be briefer by using the implicit "last" variable:

AviSource("movie.avi")
Filter(...)

YY1020
26th June 2003, 14:03
Thank you a lot for neuron2 and bilu!!!!

YY1020
30th June 2003, 15:56
Originally posted by bilu
Allways do deinterlacing before any sort of filtering in the video, except cropping.

Allways do colorspace conversion before the filter that needs that specific colorspace. Not necessarily immediatly before.

In this case you should use ConvertToYV12(interlaced=true) before the deinterlacing filters that require YV12. Or ConvertToYV12() only if you need it for other filters than the deinterlacers.


Never used MPASource, I mux after encoding.
If I used another filters that i needed to use ConvertToYV12(interlaced=true) this command??

bilu
30th June 2003, 16:02
I don't quite understood your question.

Use ConvertToXXX before the filter that needs XXX colorspace.

If that filter is a deinterlacer, use
ConvertToXXX(interlaced=true).

Never place filters before deinterlacers.


Bilu

MasterYoshidino
30th June 2003, 20:31
errrr, wrong!
what about sharpeners, they should be placed before deinterlacers.
Its also arguable for filters that can validly work on interlaced sources.

neuron2
30th June 2003, 21:11
Originally posted by MasterYoshidino
what about sharpeners, they should be placed before deinterlacers. More accurately, spatial sharpeners should operate on fields prior to deinterlacing.

SeparateFields()
Sharpen()
Weave()
FieldDeinterlace()

bilu
30th June 2003, 21:34
That's nice to know. Allways learning... :D

Thanks.

Bilu

YY1020
1st July 2003, 05:21
Originally posted by bilu
I don't quite understood your question.

Use ConvertToXXX before the filter that needs XXX colorspace.

If that filter is a deinterlacer, use
ConvertToXXX(interlaced=true).

Never place filters before deinterlacers.


Bilu
um......you said,"If used filters that a deinterlacer.""
Will use ConvertToYV12(interlaced=true)that command??

bilu
1st July 2003, 10:41
You seem to have trouble expressing yourself in English.

ConverttoYV12(interlaced=true) before deinterlacers

ConverttoYV12() after deinterlacers


No need for interlaced=true after deinterlacers.


Bilu