Addborders reducing quality?

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Songbird21
Joined: Tue Jun 18, 2002 5:00 pm
Status: Single
Location: CT, USA
Org Profile

Addborders reducing quality?

Post by Songbird21 » Sat Mar 10, 2012 7:57 pm

When I play my video in any of my media players (VLC, WMP etc) my video looks fine. But the second I add "addborders" to it via virtual dub and AVIsynth it looks like shit. I'm not using anything else except ConvertToYV12() Anyone know what I can do?
Best editing Connecticon 2013: Bravery

Switchplate City- Custom lightswitch covers (Some anime related) and more!

"Bloodline of Atlantis: The Triple Psi" - My fantasy novel (Only $1.99 It's an Ebook).

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Addborders reducing quality?

Post by mirkosp » Sat Mar 10, 2012 8:05 pm

Could you post the exact script? Also, which colourspace is your input encoded as?
Image

User avatar
Songbird21
Joined: Tue Jun 18, 2002 5:00 pm
Status: Single
Location: CT, USA
Org Profile

Re: Addborders reducing quality?

Post by Songbird21 » Sat Mar 10, 2012 8:20 pm

AVIsource("\Finished Vids\Huffys\Untitled.avi")
ConvertToYV12()
AddBorders(320, 120, 320, 120)

I don't know what the source is coded as but it shouldn't matter cause of the convert script right?

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Addborders reducing quality?

Post by mirkosp » Sat Mar 10, 2012 8:33 pm

No, that's exactly the point. If your source is YV12, converttoyv12 is useless, if it isn't, then it has to convert to yv12 which means it'll have to harshly reduce the chroma resolution, which can cause even sensible quality drops (though it's shouldn't be looking as bad as you seem to imply by saying shit, heh).
In order to keep quality to its best you should avoid colourspace conversion by all means, which means that, as your original source is most likely yv12, you should keep it that way from the preprocessing, through the editing, to the export and the final encode in order to ensure the quality stays the same. Converting back and forth from yv12 to other colourspaces is gonna cause visible colours alterations due to how the subsampling has to work.

Addborders does not do anything to the quality as it simply adds black bars around the video, so either the issue stems from a bunch of colourspace conversions, or you're doing something wrong when encoding again in vdub.
Image

User avatar
Songbird21
Joined: Tue Jun 18, 2002 5:00 pm
Status: Single
Location: CT, USA
Org Profile

Re: Addborders reducing quality?

Post by Songbird21 » Sat Mar 10, 2012 8:47 pm

Hmmm. Okay. I'll try removing the convert code. :)

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Addborders reducing quality?

Post by mirkosp » Sat Mar 10, 2012 8:52 pm

Well, the problem is that if that really is what is causing your issue, I'm afraid you can't do much aside from redoing the export making sure you export as yv12, since your distro file will need to be yv12 and thus the conversion is at some point necessary if you don't avoid it beforehand.
That's still assuming that a bad colourspace conversion is the cause behind the issue here. It could be something else. Perhaps some screens of before and after could make it clearer what the problem is.
Image

User avatar
Songbird21
Joined: Tue Jun 18, 2002 5:00 pm
Status: Single
Location: CT, USA
Org Profile

Re: Addborders reducing quality?

Post by Songbird21 » Sat Mar 10, 2012 8:56 pm

Removing the conversion seems to have fixed it. :) I saved them as yv12 when I cut my footage. So it must have been overprocessing.

User avatar
Cannonaire
Joined: Wed May 05, 2010 5:59 pm
Status: OVERLOAD
Location: Oregon
Org Profile

Re: Addborders reducing quality?

Post by Cannonaire » Sun Mar 11, 2012 12:59 am

Perhaps the video was HD (TV.709)? ConvertToYV12 assumes TV.601 I think.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Addborders reducing quality?

Post by mirkosp » Sun Mar 11, 2012 2:58 am

That would have just shifted the colours. Subsampling gives nastier results than just that...
Image

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: Addborders reducing quality?

Post by Mister Hatt » Sun Mar 11, 2012 4:35 am

Huffy is often YUY2. The other thing is that your original resolution might not have been capable of staying YV12 with those border additions and then for whatever reason, a random avs bug came up and tried to hack up what the chroma should be, but I doubt this.

Locked

Return to “AviSynth Help”