View Full Version : AviSource usage in Avisynth 2.52
Bordo32
12th September 2003, 22:49
A quick question,
I just switched from Avisynth 2.08 to 2.52 , testing out how it works.
My test.avi is captured from MiniDV as DV type2 AVI, and I am using MainConcept codec.
I run a script:
AviSource("test.avi")
Info()
gives YUY2. A question is, why an avi file is not opened as a YV12 as Forum "FAQ YV12" says :
"From v2.5 the default pixel_type parameter will be changed to YV12
allows you to choose the output format of the decompressor."
Do I do something wrong or is it a AviSource problem?
mf
12th September 2003, 23:05
Originally posted by Bordo32
A quick question,
I just switched from Avisynth 2.08 to 2.52 , testing out how it works.
My test.avi is captured from MiniDV as DV type2 AVI, and I am using MainConcept codec.
I run a script:
AviSource("test.avi")
Info()
gives YUY2. A question is, why an avi file is not opened as a YV12 as Forum "FAQ YV12" says :
"From v2.5 the default pixel_type parameter will be changed to YV12
allows you to choose the output format of the decompressor."
Do I do something wrong or is it a AviSource problem?
I don't know much about DV, but I see two possibilities.
1) DV isn't YV12, but YUY2 (could very well be, Canopus outputs YUY2 as well)
2) Mainconcept DV codec simply can't output YV12.
WarpEnterprises
15th September 2003, 14:06
the default pixel_type parameter
this means if you don't specify something it will TRY
YV12,
else try YUY2
else RGB
Bordo32
17th September 2003, 20:38
Thanks for the info.
I am using a script below to process NTSC avi type-2 file, interlaced, BFF, captured from MiniDV type with Scenalyzer:
AviSource("test.avi")
ReInterpolate411()
ConvertToYUY2(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()
A question is, if the Avisynth recognizes what the color space is, why do I need to use a
"ConvertToYUY2(interlaced=true)" line.
And what is better, to use at the end "DoubleWeave.SelectOdd()"
or after avi to mpeg conversion with CCE 2.66, "top field first" unchecked, run a Puldown.exe and fix the field order?
I am just curious, why some DV avi processing scripts begin like script below (have found by reading through Doom9 forums) if it is already known that DV avi is bbf, YUY2, interlaced:
AviSource("test.avi")
AssumeFieldBased
AssumeBFF
ConvertToYUY2( interlaced=true)
###########
# Filters #
###########
Si
17th September 2003, 22:03
AviSource("test.avi")
AssumeFieldBased
AssumeBFF
ConvertToYUY2( interlaced=true)
The AssumeFieldbased is likely to be an error - a lot of people think it means assume the source is interlaced - but it doesn't :( - but in normal (mis)usage - its harmless.
All DV is BFF but AVISource doesn't/can't know this so you have to tell Avisynth what order it is - acutally you don't as Avisynth defaults to AssumeBFF - so there's another line that's not needed :)
And unbelievably, a lot of DV codecs only output RGB so you have to do a ConvertToYUY2 to get it into YUV Colorspace - but only if your filters need it - otherwise you could leave that one out as well :D
Moral of story - don't believe what other people write - including me of course ;)
regards
Simon
Bordo32
18th September 2003, 19:02
Thanks for the answer.
Is it correct that it is nothing wrong if a script has a line "ConvertToYUY2(interlaced=true)" even it is known that DV codec outputs YUY2 color space file as YUY2?
Does anyone know what is right way to pursue with the CCE field order
behavior. To use "DoubleWeave.SelectOdd()" or to fix field order problem by running Puldown and changing field order to BBF?
DDogg
18th September 2003, 19:31
The CCE faq covers the field order question pretty well I think. Starting with Q10. Hope that helps you.
http://forum.doom9.org/showthread.php?s=&threadid=53770
Si
18th September 2003, 21:05
Is it correct that it is nothing wrong if a script has a line "ConvertToYUY2(interlaced=true)" even it is known that DV codec outputs YUY2 color space file as YUY2?
Yes - I had a look at the code and it just returns the source back again.
But if you know your DV codec is delivering YUY2 - why not just remove the line?
regards
Simon
Bordo32
18th September 2003, 23:37
Thanks for your answers.
I always uncheck "Upper Field First" in CCE and after encoding I use Restream Changer to change the field order flag to bff. After that I have bff mpeg with the field order flag set to bottom and without the line shift. I did not see any problems by playing DVD. Does this mpeg meet DVD spec. requirement or it must be done with the line shift?
Now I just read CCE FAQ Q10, it says:
"If for some reason you want to encode bff video without that line shift, there are two ways to do this:
1. Frameserve bff video into CCE via AVISynth and convert it to tff "the right way". Here is a basic AVISynth script that does this:
code:
AVISource("E:\Video\holiday.avi")
DoubleWeave.SelectOdd
Uncheck "Upper Field First" in CCE and encode."
I think it is exactly what "DV to DVD guide" by bb (DV forum Sticky) has suggested.
Does it mean that "DV to DVD guide" has suggested to encode video without the line shift?
Thanks for your patience, I am here to learn.
bb
20th September 2003, 07:40
Originally posted by Bordo32
I think it is exactly what "DV to DVD guide" by bb (DV forum Sticky) has suggested.
Does it mean that "DV to DVD guide" has suggested to encode video without the line shift?
Yes.
bb
Bordo32
23rd September 2003, 21:52
Thanks.
@bb, I know this is not right topic to ask about the "DV to DVD guide". Shouldn’t be a Timecode Setting (in the CCE Encoder setting window) set to 00:00:00:00 instead of keeping at default 01:00:00:00?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.