digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: YUY2, YV12 error? (http://www.digitalfaq.com/archives/avisynth/4260-avisynth-yuy2-yv12.html)

J-Wo 06-30-2003 02:59 PM

Avisynth: YUY2, YV12 error?
 
I'm having some problems with avs 2.52 and one of my divx files. Sometimes I get the error Undot: Supports YUY2 color format only when trying to open my avs files in virtualdub. This seems to only happen with divx files, in this case an older divx3 file. To get around this, I usually add the lines ConvertToYUY2() and ConvertToYV12() before and after Undot() respectively. But this time around, I get the error Couldn't locate a decompressor for format 'YV12'. Tmpgenc won't even open my avs files. I've tried uninstalling and reinstalling my codecs, avs 2.52 (including the ffvw), with no success. Any idea what's going on?

rendalunit 06-30-2003 03:09 PM

make sure your version of Undot is for 2.5x
http://www.avisynth.org/~warpenterprises/

also you can check which codec you need for your .avi with the GSpot utility.

J-Wo 06-30-2003 04:30 PM

Well seeing as how there only IS Undot for 2.52, yes I'm sure I have the right filter. Interestingly enough, the readme file says UnDot "Requires either YUY2 or YV12 input" so I have no idea why I'm getting my original error in the first place. Also I have already loaded my file with GSpot which is how I know it is a div3 file (its 4cc designation). It says I have 3 compatible codecs on my system. So that's why I tried to reinstall my codecs to make sure that wasn't the problem. Here is a full copy of my current script
Code:

### Ver. June 30, 2003 @00:06 GMT ###

## DLL Section ##
#
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\GripFit_YV12.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\STMedianFilter.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\asharp.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\undot.dll")
#
####


## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#

AviSource("E:\Movies\Farscape\315.avi")

#
ConvertToYUY2()
undot()
ConvertToYV12()
Limiter()
asharp(2, 4)
GripCrop(352, 240, source_anamorphic=false)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.2))

#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2 ? \
unfilter( -(fmin(round((nf/0.5)), 100)), -(fmin(round((nf/0.5)), 100)) ) : \
TemporalSoften(4, round(1/nf) , round(3/nf) ,0, 2) ") 

#
#
#

GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
LetterBox(16, 16, 16, 16)

Limiter()

#
#
## Functions ###

function fmin(float f1, float f2) {
  return (f1<f2) ? f1 : f2
}

#
####

Any other ideas guys? Thanks!

rendalunit 06-30-2003 05:43 PM

Ok one last idea- replace the 'converttoyuy2' line with 'coverttoyv12' and open it with VDubMod (but not via avisynth script).

J-Wo 06-30-2003 06:15 PM

Quote:

Ok one last idea- replace the 'converttoyuy2' line with 'coverttoyv12' and open it with VDubMod (but not via avisynth script).
I don't understand what you mean by open it with VDubMod but not via avisynth script. What exactly do you want me to open, the avi file or the avs file? If I replace as you say and open the avs file in VDubMod, I get the error message Could locate decompressor for format 'YV12'

rendalunit 06-30-2003 11:42 PM

maybe this thread can help:
http://www.kvcd.net/forum/viewtopic....f03a63197400eb

Wilbert 07-01-2003 03:11 AM

Just install DivX5 or a recent build of XviD, which is capable of decoding YV12.

Dialhot 07-01-2003 05:19 PM

I just had the problem and the origin is that in fact your clip isn't in YV12 nor YUY2 but in RGB !

As told by Wilbert, it's a matter of codec : some don't uncompress video in YV12. But for my part I have one of the last Divx lib (5.05) so...

... its faster to add a "ConvertToYV12" just after the Avisource.

That's all, everything will run ok.

Bilal 07-02-2003 05:11 PM

my problem was solved i uninstalled avisynth 2.52 because i gave up on it i installed and was working with scripts using avisynth 2.07 then i decided to try avisynth 2.52 again so i installed it (without uninstalling 2.07) and i changed my script a bit by just putting the undot() between the convert like in J wo's script
ConvertToYUY2()
undot()
ConvertToYV12()
and it worked perfectly i don't know which of the above fixed it, i hope this helps
Bilal

Bilal 07-02-2003 10:55 PM

i forgot to say i installed ffvw the program that comes with avisynth2.5, i chose not to install it when i was having the problem, so it could be this that fixed it :lol:

Dialhot 07-03-2003 06:38 AM

Quote:

ConvertToYUY2()
undot()
ConvertToYV12()
and it worked perfectly i don't know which of the above fixed it, i hope this helps
Bilal
That's amazing ! You do a double space color convertion (not a very good idea) where only ONE is enought !

Change your script to :

Avisource(....)
ConvertToYV12()
Undot()
...

And everything will be ok.

Bilal 07-03-2003 09:07 PM

ok i did that and it still works :oops: thanks dialhot so it's not that which fixed it.


All times are GMT -5. The time now is 11:01 AM  —  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.