Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th December 2006, 22:39   #1  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
ConvertToYV12 weirdness.

Alright, still new to the color space business. I've got a rough idea how they all work now. My issue is with converting to YV12 to use MCBob. With some sources it works fine, with others it's being strange.

Here's the frame in question that is behaving oddly.

YUY2 (unedited, as captured)
YV12
fields

And yes, I did it with (interlaced=true). The "broken" parts of the frame are obvious but i'm not sure why they are turning out this way.

Any ideas? Thanks

And one other question related to MCBob if someone happens to know the answer, any reason why the YV12 is necessary in the first place or if there is a way to use it without converting away from YUY2?
vkamicht is offline   Reply With Quote
Old 9th December 2006, 23:01   #2  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Quote:
Originally Posted by vkamicht View Post
Alright, still new to the color space business. I've got a rough idea how they all work now. My issue is with converting to YV12 to use MCBob. With some sources it works fine, with others it's being strange.

Here's the frame in question that is behaving oddly.

YUY2 (unedited, as captured)
YV12
fields

And yes, I did it with (interlaced=true). The "broken" parts of the frame are obvious but i'm not sure why they are turning out this way.

Any ideas? Thanks

And one other question related to MCBob if someone happens to know the answer, any reason why the YV12 is necessary in the first place or if there is a way to use it without converting away from YUY2?
It looks like somehow, mcbob separated the fields, and not wove them back together. Maybe you could upload part of the video, so I can see if I can dupe the result?

And to answer your question regarding YV12
Terranigma is offline   Reply With Quote
Old 9th December 2006, 23:02   #3  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
Quote:
Originally Posted by Terranigma View Post
It looks like somehow, mcbob separated the fields, and not wove them back together. Maybe you could upload part of the video, so I can see if I can dupe the result?

And to answer your question regarding YV12

This isn't with MCbob... that's simply converting to YV12 without deinterlacing. The frames are a regular interlaced frame.

The problem exists after deinterlacing, that's how I noticed it in the first place. But this is just showing that MCbob isn't the problem.
vkamicht is offline   Reply With Quote
Old 9th December 2006, 23:03   #4  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
The fields are separated from one another. Tried weaving?
Terranigma is offline   Reply With Quote
Old 9th December 2006, 23:08   #5  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
Quote:
Originally Posted by Terranigma View Post
The fields are separated from one another. Tried weaving?
Wait, what?

The first image is just a regular interlaced frame (two fields) without editing or color conversion--just as it was captured.

The second image is the same frame, same fields, converted to YV12 with (interlaced=true). This one shows the errors.

The third is just the unedited, unconverted fields from the first image for reference.
vkamicht is offline   Reply With Quote
Old 9th December 2006, 23:13   #6  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Ahh, I got ya. You know, I could'nt really tell a difference 'til I examined them side by side. After the mcbob line, can you try changing the colorspace back to the original colorspace (converttoyuy2, if that's what it was), and see if the little subtlety's still there?
Terranigma is offline   Reply With Quote
Old 9th December 2006, 23:16   #7  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
Quote:
Originally Posted by Terranigma View Post
Ahh, I got ya. You know, I could'nt really tell a difference 'til I examined them side by side. After the mcbob line, can you try changing the colorspace back to the original colorspace (converttoyuy2, if that's what it was), and see if the little subtlety's still there?
Sorry about that. Well, like I said, this error occurs during the ConvertToYV12 process and not with MCbob. And converting back to YUY2 doesn't do much at all--still doesn't look as it should.
vkamicht is offline   Reply With Quote
Old 9th December 2006, 23:18   #8  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
I was gonna suggesst using the colormatrix script which can be obtained Here, but I'm not sure if that'd help. Maybe foxyshadis might have an inkling on what to do.
Terranigma is offline   Reply With Quote
Old 9th December 2006, 23:32   #9  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
THe problem is you're looking at it in virtualdub, which does the equivalent of ConvertToRGB() on it. Notice the distinct lack of "interlaced=true" there. So really, all you have to do is convert it back to YUY2 or RGB in interlaced if you want to make vdub happy, then comment out that line and go on with the script when you're satisfied that it works.

(How'd you know I was reading the thread. >( )
foxyshadis is offline   Reply With Quote
Old 9th December 2006, 23:35   #10  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Quote:
Originally Posted by foxyshadis View Post
(How'd you know I was reading the thread. >( )
I sensed your presence
Terranigma is offline   Reply With Quote
Old 9th December 2006, 23:40   #11  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
Quote:
Originally Posted by foxyshadis View Post
THe problem is you're looking at it in virtualdub, which does the equivalent of ConvertToRGB() on it. Notice the distinct lack of "interlaced=true" there. So really, all you have to do is convert it back to YUY2 or RGB in interlaced if you want to make vdub happy, then comment out that line and go on with the script when you're satisfied that it works.

(How'd you know I was reading the thread. >( )
Hrm... well I'm encoding in xvid with Vdub so the "What I see is what I get" holds true. Just tested it without converting back to anything and the video had this problem too. This means I have to convert back to YUY2 or RGB in the script even before encoding... any way I can get around this?
vkamicht is offline   Reply With Quote
Old 9th December 2006, 23:50   #12  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Quote:
Originally Posted by vkamicht View Post
This means I have to convert back to YUY2 or RGB in the script even before encoding... any way I can get around this?
Change vdub from full processing, to Fast Recompress, and encode from there.
Or alternatively in Full Processing mode, Choose "Color Depth...", and choose the appropriate colorspace for the output format.

edit: Not sure the output color thingy will affect your encode in any way.
It'd be safer to choose fast recompress and encode.

Last edited by Terranigma; 9th December 2006 at 23:53.
Terranigma is offline   Reply With Quote
Old 10th December 2006, 00:02   #13  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
Quote:
Originally Posted by Terranigma View Post
Change vdub from full processing, to Fast Recompress, and encode from there.
Or alternatively in Full Processing mode, Choose "Color Depth...", and choose the appropriate colorspace for the output format.

edit: Not sure the output color thingy will affect your encode in any way.
It'd be safer to choose fast recompress and encode.
Fast recompress doesn't help, still looks the same.

The really blocky looking areas at the bottom look better if I decompress as YUY2 and output as YV12. Does that sound right? Unfortunately the rest of the colors on the frame still don't look as correct as I hoped they would. I wonder if I'll just have to settle with it... I have a bit of a perfectionist attitude with this so I'm really upset that mcbob won't accept YUY2.
vkamicht is offline   Reply With Quote
Old 10th December 2006, 00:05   #14  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by vkamicht View Post
Hrm... well I'm encoding in xvid with Vdub so the "What I see is what I get" holds true. Just tested it without converting back to anything and the video had this problem too. This means I have to convert back to YUY2 or RGB in the script even before encoding... any way I can get around this?
Conversion to YUY2 never hurts, though it shouldn't be necessary. Besides what Terranigma said, the xvid output will also be munged the same way if you just open that up in vdub. You'll have to deinterlace it on playback, or upconvert manually if the automatic conversion (usually in the video card) is incorrect. I have no idea if ffdshow's conversion to YUY2 would respect chroma interlacing.

(Btw, you asked why, earlier. It's because most newer avisynth filters either run only in YV12 or somewhat faster. And all common codecs use only YV12.)
foxyshadis is offline   Reply With Quote
Old 10th December 2006, 00:14   #15  |  Link
vkamicht
Registered User
 
Join Date: Dec 2005
Posts: 16
Alright, thanks guys...

I've just never had all these weird issues until I started converting to YV12 in the avisynth script. I've always used xvid for compression, and apparently it converts to YV12 anyway? Yet all of my videos looked fine as far as the colors go. Now all of a sudden I'm finding problems that only exist on half of my videos, and when I find the appropriate settings to fix those, I find new problems with my other videos.

If I use the settings to fix the frame in question above, it creates a problem in another vid of mine where some thin lines on the image suddenly have ghosting above/below them. Same type of source too (YUY2). I'm just not sure where to go from here :P
vkamicht is offline   Reply With Quote
Old 10th December 2006, 00:37   #16  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Well, like I said, it never hurts to convert everything back to YUY2 when you're done processing. That way the codec can take care of all the colorspace issues as it needs to.
foxyshadis is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.