Log in

View Full Version : Conversion YUY2 to YV12


Cunhambebe
2nd September 2006, 18:17
Most of you may know that Sony Vegas is an editor that works in RGB mode. On the other hand, DebugMode's Frameserver serves in RGB24, 32 and YUY2.
My questions are very simple: Frameserving from Vegas in YUY2, and using this script for AviSynth:

AVISource("c:\your_project.avi")
Lanczos4Resize(640,360)

...will there be any color conversion, from YUY2 ot YV12?
Do I need to add something else on the script (just in case if there's really a color conversion)? I've already searched around here and found some topics on Frameserving from Vegas but nothing about this. Thanks in advance.
Note: the project is made up of pictures for a slideshow - no real video in the timeline.

JMP
2nd September 2006, 19:06
Avisynth filters do not generally do any colorspace conversions (with the obvious exception of converters :)). Thus if your source is YUY2, it will stay YUY2 after resize.

Cunhambebe
3rd September 2006, 03:47
Thanks for the input. What if my output is Xvid. As far as I know Xvid is YV12 not YUY2. Will there be a conversion?
Thanks in advance.

check
3rd September 2006, 04:51
You need to manuall add ConvertToYV12() at the end of your script.

scharfis_brain
3rd September 2006, 09:53
there is no need to add converttoyv12() if you're going to encode XVId.
It will convert the chroma by itself.

Cunhambebe
3rd September 2006, 16:17
Thanks to all who took time to respond.
there is no need to add converttoyv12() if you're going to encode XVId.
It will convert the chroma by itself.
-Great, but will there be a loss of quality? According to http://www.avisynth.org/mediawiki/wiki/ConvertToYUY2 YUY2 is 4:2:2 and YV12 is 4:2:0.
-Let's suppose my output is another one, for instance MPEG2 instead of Xvid. Can I leave the script the way it is or should I add Converttoyv12()?
Thanks in advance.

Wilbert
3rd September 2006, 16:31
-Great, but will there be a loss of quality?
Yes.

-Let's suppose my output is another one, for instance MPEG2 instead of Xvid. Can I leave the script the way it is or should I add Converttoyv12()?
Depends on the encoder. Note that mpeg-2 (in dvd) is always stored as YV12 (but in general it can be YV12 or YUY2). HC and QuEnc requires YV12, so in that case you need to add ConvertToYV12. CCE requires YUY2 or RGB. TMPGEnc requires RGB (so you need to add ConvertToRGB24).

Cunhambebe
3rd September 2006, 17:04
Thank so much for your help, Wilbert.
-Is there any way, any workaround for this, I mean, frameserving as YV12 instead of YUY2?

HC and QuEnc requires YV12

-Sorry for my ignorance but what does HC and QuEnc mean?
Thanks in advance,
Greetz from Brazil,
Mark

pandy
25th September 2006, 15:53
HC and QuEnc are freeware MPEG encoders

Cunhambebe
25th September 2006, 23:53
Thank you very much pandy!
I've already found their homepage :o
Greetz!
Mark