View Full Version : YV12 or YUY2 for CCE 2.67?
Fotis_Greece
1st July 2003, 21:28
I quote this from another thread "Neither CCE nor TMPGEnc can use YV12 input since Windows has no internal YV12 compressor. This only means that the last line of AviSynth must be a ConvertToYUY2 (for CCE, or ConvertToRGB24 for TMPGEnc"
Is this true since so far all .d2v projects of mine frameserved to CCE looked great with simple YV12 decoding using mpeg2dec3.dll
What is supposed to happen if I don't convert to YUY2? Is it supposed to expect worse quality that encoding with prior conversion to YUY2?
Also tell me if this script is ok
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2(interlaced=true)or (interlaced=false)
And finally I guess there is no need to use the LoadPlugin line for the mpeg2dec3.dll if it's in the Avisynth 2.52 plugin directory, right?
Thanks in advance
Wilbert
2nd July 2003, 09:51
Is this true since so far all .d2v projects of mine frameserved to CCE looked great with simple YV12 decoding using mpeg2dec3.dll
What is supposed to happen if I don't convert to YUY2? Is it supposed to expect worse quality that encoding with prior conversion to YUY2?
CCE requires YUY2 and TMPGEnc RGB24. If you don't feed it with the correct color format, two things can happen:
1) It works fine, meaning that Huffyuv, DivX5, XviD or some other codec is doing the appropriate conversion for you.
2) It doesn't works (gives a black screen for example). Could mean that some crappy codec is doing the conversion for you.
In both cases there is no reason (except laziness) not to do the color conversions in AviSynth. Quality is good, and the speed is probably faster than the conversions in (1).
Also tell me if this script is ok
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2(interlaced=true)
If you want to keep in interlaced (or convert to YUY2 before deinterlacing), then yes. Otherwise you have to use:
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2()
Have a look at: http://www.avisynth.org/index.php?page=Convert
And finally I guess there is no need to use the LoadPlugin line for the mpeg2dec3.dll if it's in the Avisynth 2.52 plugin directory, right?
Yup.
tiki4
2nd July 2003, 10:05
While we're at it:
DVD2SVCD still installs a very old plugin from the HuffYUV author called 'ReadAVS' when using TMPGEnc. Does anyone know what this plugin exactly does? I guess it spits out RGB24 but I don't know how to verify this. This plugin isn't really necessary for newer versions of TMPGEnc but still d2s sets the priority of that plugin to '3' which is higher than any other plugin. Not that I have problems, I'm just curious.
Your help is appreciated,
tiki4
Wilbert
2nd July 2003, 10:07
I also would like to know that :)
Happygolucky
2nd July 2003, 13:05
Now I'm confused. If using TMPGEnc Plus 2.513 (latest version) and AVISynth 2.52, I should have the ConvertToRGB24() in the script still? That is faster or better than letting installed codecs do the conversion? I have the Huffy, as well as latest releases of Xvid and Divx installed.
Wilbert
2nd July 2003, 13:09
Why don't you try it? It should be just as good and a little bit faster when doing the conversion in AviSynth.
Fotis_Greece
2nd July 2003, 14:26
Thank you very much for the information.
So to conclude, If I have an interlaced source .d2v project which I need to frameserve to CCE for mpeg2 encoding the avisynth scipt syntax should be:
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2(interlaced=true)
If the source is progressive it should be
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2()
Are these scipts right? And by the way does it matter if we use ConvertToYUY2(interlaced=false) instead of ConvertToYUY2() just to avoid confusion with the trues and falses (since the default is false whereas with mpeg2dec3.dll colorspace inbuilt conversions the default is true)?
Wilbert
2nd July 2003, 14:42
So to conclude, If I have an interlaced source .d2v project which I need to frameserve to CCE for mpeg2 encoding the avisynth scipt syntax should be:
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2(interlaced=true)
If the source is progressive it should be
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2()
Yup.
And by the way does it matter if we use ConvertToYUY2(interlaced=false) instead of ConvertToYUY2() just to avoid confusion with the trues and falses (since the default is false
Thus, it doesn't matter. You can use ConvertToYUY2(), ConvertToYUY2(false) or ConvertToYUY2(interlaced=false).
whereas with mpeg2dec3.dll colorspace inbuilt conversions the default is true)?
Didn't know that.
DDogg
2nd July 2003, 17:01
DVD2SVCD still installs a very old plugin from the HuffYUV author called 'ReadAVS' when using TMPGEnc. Does anyone know what this plugin exactly does?Readavs.dll allows VFAPI [also TMPG?] to open AVS scripts as well as VDR signposts [VDub frameserving files).
trbarry
2nd July 2003, 18:37
I don't use CCE but I am not entirely sure that using MPEG2DEC3 would be best if you wanted to keep an interlaced source and pass it interlaced in YUY2.
There is a version of MPEG2DEC2 around here somewhere that returns YUY2 into Avisynth 2.5. And the YV12->YUY2 conversion done within that module should be able to take advantage of the MPEG-2 flags on a frame by frame basis.
So maybe someone might experiment with that one when sending interlaced YUY2 to CCE. Just a thought.
- Tom
Not to hijack, but where would one find the Avisynth 2.5x compatable mpeg2dec2. The one I found was avisynth 2.0x only.
Fotis_Greece
2nd July 2003, 19:20
Do you guys suggest it is better to de-interlace an interlaced source .d2v project and then finally passing it to CCE and render to mpeg2 as progressive? Does deinterlacing generally improve the quality of the video and will the finally rendered progressive mpeg2 file look better?
I am asking this because so far I knew that if a video source is interlaced, it should be treated like this but taking care of the field order settings in the encoder.
And if we de-interlace a .d2v project using avisynth scripts, should the ConvertToYUY2 line be located at the very end of script and also indicating that the source is no more interlaced
ConvertToYUY2()?
So this is a script passing interlaced .d2v projects to CCE with appropriate colorspace conversion
mpeg2source("C:\videos\movie.d2v",idct=5)
ConvertToYUY2(interlaced=true)
How should this script be modified in order for the movie.d2v project be deinterlaced and be frameserved to CCE as progressive? Is there inbuilt avisynth deinterlacing commands or we should use some kind of plugin? Can you please someone write the proper script?
Wilbert
2nd July 2003, 19:45
Not to hijack, but where would one find the Avisynth 2.5x compatable mpeg2dec2. The one I found was avisynth 2.0x only.
Tom means a mpeg2dec version for AviSynth v2.5x which outputs YUY2. You can find it in the "AviSynth Filter Collection" sticky.
Do you guys suggest it is better to de-interlace an interlaced source .d2v project and then finally passing it to CCE and render to mpeg2 as progressive? Does deinterlacing generally improve the quality of the video and will the finally rendered progressive mpeg2 file look better?
If interlace means "phase shifts, reversed field orders" or telecined, then yes it is better to deinterlace.
If interlace means "trully interlaced", then it depends. It depends on the final bitrate (and format) whether you should deinterlace it or not. If you want to reencode to dvd you can leave it interlaced. Anyway look at the following pages what to do:
http://www.doom9.org/ivtc-tut.htm
And if we de-interlace a .d2v project using avisynth scripts, should the ConvertToYUY2 line be located at the very end of script
Yes, because most deinterlacers (like decomb) also work in YV12. If you convert it to YUY2 first (with the interlaced=true option), it will be slower (and less accurate) than when you convert it to YUY2 at the end of your script.
I suggest you read the link above, and try to identify when kind of interlaced source you have.
Fotis_Greece
2nd July 2003, 20:54
Originally posted by trbarry
I don't use CCE but I am not entirely sure that using MPEG2DEC3 would be best if you wanted to keep an interlaced source and pass it interlaced in YUY2.
- Tom
If we use the MPEG2DEC3's inbuilt colorspace conversion YV12toYUY2() instead of avisynth's ConvertToYUY2(interlaced=true) do you think then that the interlaced YUY2 will be passed more accuratelly? It's a pity to go back and use older versions since mpeg2dec3 is developing and achieve better speed.
Holomatrix
4th July 2003, 18:23
Originally posted by Fotis_Greece
If we use the MPEG2DEC3's inbuilt colorspace conversion YV12toYUY2() instead of avisynth's ConvertToYUY2(interlaced=true) do you think then that the interlaced YUY2 will be passed more accuratelly? It's a pity to go back and use older versions since mpeg2dec3 is developing and achieve better speed.
Sorry, I'm not to bright on this stuff, are you saying that I could use YV12toYUY2() at the end of my script feeding to CCE instead of Converttoyuy2() even though my video is not interlased and I might get a speed improvement?
Thanks
Wilbert
5th July 2003, 14:02
Sorry, I'm not to bright on this stuff, are you saying that I could use YV12toYUY2() at the end of my script feeding to CCE instead of Converttoyuy2()
YV12toYUY2 uses interlaced=true by default. So, you should put YV12toYUY2(interlaced=false) at the end (assume that the clip is deinterlaced).
and I might get a speed improvement?
No, because mpeg2dec3's YV12toYUY2 is mapped from AviSynth's ConvertToYUY2. So, results are identical.
Holomatrix
5th July 2003, 16:05
Ok, thanks, just wondering. I work with mostly NTSC progressive anyway so I'll just stick with Converttoyuy2 then.
As of CCE SP 2.67.0.11, YV12 input is supported. So if you use that version along with avisynth 2.52 and latest decomb that supports yv12, converttoyuy2() is not needed.
sh0dan
8th July 2003, 08:03
@OxP: Are you sure? Have they written that themselves?
Doom's statement on the front page was wrong.
Wilbert
8th July 2003, 09:19
As of CCE SP 2.67.0.11, YV12 input is supported.
Yes, but in the sense that an external decoder could convert YV12 -> YUY2, before feeding it to CCE (as is possible with TMPGEnc since a long time, RGB24 of course). This was not possible with older versions of CCE, where you needed ConvertToYUY2.
I think Doom didn't correct that on his news-page.
sh0dan
8th July 2003, 10:26
I would still recommend converting internally. Codecs that decode YV12 -> YUY2 produce varying quality, and varying speed, and doesn't know about interlaced/noninterlaced, so unless you are sure your codec does a better job - always convert internally.
DDogg
8th July 2003, 18:19
I did some tests a month or so ago with CCE 2.67.11 not using the converttoyuy2 statement. In my case the conversion was being done by the version of ffvfw included with Avisynth 2.52. While it worked fine, I still saw a small (read very small) increase of speed using the ConvertToYUY2 statement. Given the extra parameters available like (interlaced=true) and the known high quality of the conversion based upon countless hours of work from Sh0dan, I continue to use the ConvertToyuy2() statement as my preferred method as he suggested.
digitalman
11th July 2003, 18:09
I do not have FFVFW installed on my system. I uninstalled it because it caused issues with DVD Workshop. I tested 2.67.11 and I do not need the converttoyuy2() line. It does seem to encode a little slower when not using that line. If I run 2.66 CCE I need the converttoyuy2() line. So it is most likely a change in 2.67.11.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.