PDA

View Full Version : AVs option - ConvertToYUY2


steptoe
7th September 2006, 11:35
I have a project I'm working on thats interlaced and finally worked out that the output was going all screwy due to not having ConvertToYUY2(interlaced=true) as the very first line in my script list, once I added this via the script editor things were fine

I deselected the ConvertToYUY2(interlaced=true) from the AVS options in DVD-RB Pro, as I didn't see the point in having it twice, but checking the .avs file after a quick 10 second encode to check teh filters now working, the ConvertToYUY2(interlaced=true) is still there so it looks like setting the option to remove it isn't actually removing the filter


This is the .avs files after deselecting the AVS option in DVD-RB and quitting the program just in case its saved somewhere as a setting

#------------------
# AVS File Created by DVD Rebuilder
# VOBID:01, CELLID:01
#------------------
LoadPlugin("E:\CD And DVD Related\DVD-RB Pro\DGDecode.dll")
mpeg2source("P:\----------Temp_Folders\DVD-RB_Work\D2VAVS\V01.D2V",idct=4)
LoadPlugin("E:\Video Related\AviSynth\plugins\Colormatrix.dll")
Import("E:\Video Related\AviSynth\plugins\RemoveDirt.avs")
Import("E:\Video Related\AviSynth\plugins\MVBob.avs")
ConvertToYUY2(interlaced=true)
CropBottom(10)
trim(0,131)
ConvertToYUY2(interlaced=true)
AudioDub(BlankClip())



Will having two lots ConvertToYUY2(interlaced=true) in the script effect anything quality wise as its a VHS transfer that needs cleaning up so I don't want to lose even more quality by having unnecessary filters

Boulder
7th September 2006, 11:52
If the colorspace is already YUY2, the ConverttoYUY2 does nothing.

Rippraff
7th September 2006, 14:22
but checking the .avs file after a quick 10 second encode to check teh filters now working, the ConvertToYUY2(interlaced=true) is still there so it looks like setting the option to remove it isn't actually removing the filter
You're working with CCE right?

jdobbs has implemented a check for CCE a long time ago after he got lots of user complains, CCE didn't work. The reason was simple, they have forgotten to mark ConvertToYUY2.
So if your encoding with CCE, ConvertToYUY2() will always be added nonetheless the option is checked or not.

But as Boulder already mentioned, the second colorspace conversion will be ignored.

Anyhow I'm wondering why you need YUY2 at this part of the script, because there's only a crop behind.
I've never worked with CropBottom, maybe try
Crop(0,0,-0,-10) instead.

Cu Rippraff

jdobbs
7th September 2006, 18:32
Yeah. If you're using CCE the conversion is done regardless of whether it is selected. Although starting with v2.70 CCE will accept YV12 -- it is my understanding that CCE still does a conversion to YUY2 internally -- so my logic is that it is better to use the AVISYNTH filters. More control.

rahzel
7th September 2006, 23:12
yup, i always thought all versions of CCE needed to be converted to YUY2, but i was told that versions 2.70 and newer will accept YV12, so the conversion is not needed (however, it is converted to YUY2 anyway).

blutach
7th September 2006, 23:17
Yeah. If you're using CCE the conversion is done regardless of whether it is selected.Wonder why this is not also instituted for Procoder 2 users?

Regards

jdobbs
7th September 2006, 23:23
I could add it easy enough. I'm trying to remember why I didn't... do all versions of ProCoder require YUY2?

scharfis_brain
7th September 2006, 23:43
if you feed ProCoder with YV12 you'll get wrong luma as well as strong banding. So I recommend to feed ProCoder with YUY2 only.

The only MPEG2 encoders I know of accepting YV12 natively are HcEnc and QuEnc.

jdobbs
7th September 2006, 23:47
I'll force YUY2 for ProCoder in the next release.

blutach
8th September 2006, 01:20
@jdobbs - Many thanks :)

@scharfis_brain - Early on in my use of Procoder 2, I naively had this turned off. And what a mess it was. Took a while to figure it out :)

Regards

danpos
8th September 2006, 20:23
The only MPEG2 encoders I know of accepting YV12 natively are HcEnc and QuEnc.

AQE (AutoQMatEnc) also accepts it. ;)

Regards,

steptoe
8th September 2006, 21:32
Reason was a filter was complaining that it couldn't accept YV12 source, but added the ConvertYUY2() fixed that, but had more problems with other things

Noticed that CropBottom was there in the crop description as its only to remove VHS banding from the bottom, tried CropBottom and did the job without needed the ConvertYUY2() in the end


Avisynth really is very powerful, but the good stuff is also very slow. Quality is better than speed in that case

jdobbs
8th September 2006, 21:45
I don't think that script would work in a DVD because you would have ended up with an illegal frame size. If you crop lines off the bottom you have to either resize the image or add a border to replace the cropped lines.

CropBottom() should work with YV12, so the ConvertToYUY2() isn't needed. Were you using one of the imported filters when you first added it?

Also, since you used the IMPORT() statement there could be any number of other filters in use that can't be seen.

manono
9th September 2006, 08:35
If he's cropping 10 pixels off the bottom, YV12 requires mod4 crops for interlaced sources or terrible things might start to happen, while YUY2 requires only mod 2:

http://www.avisynth.org/Crop

I also noticed that after the crop he no longer has a DVD resolution. Maybe there's a resize or AddBorders in there somewhere.