Scripting Help (mostly for dark scenes)

User avatar
Kazemon15
Joined: Fri May 09, 2003 9:28 pm
Status: Reborn! Fanatic
Location: AMV Freak, California
Contact:
Org Profile

Scripting Help (mostly for dark scenes)

Post by Kazemon15 » Tue Mar 12, 2013 4:52 pm

...so like, I noticed almost all my dark scenes from my R2 DVDs have an issue when I script them. The brighter scenes are fine, but once the scene becomes dark...oh god, the banding and blocks... make it stop...I'm not sure what to do with this issue... I didn't notice it before because I had a crappy screen...but now I got a new 1080 one...and...well, what has been seen cannot be unseen.

Here's a before and after compassion. Source is R2 Reborn DVDs in VOB format.

Before:

Image

After:

Image

Script:

Code: Select all

mpeg2source("L:\Reborn Bullet 1\KHR Disney 1 - 1.d2v",cpu=0)
tfm()
converttoyv12()
deen("w2d",2,1,3)
removegrain(2)
deblock()
tweak()
Assumefps(23.97)
crop(4,0,-4,-0)
LanczosResize(640,480)
Thanks in advance for any help.

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

Re: Scripting Help (mostly for dark scenes)

Post by mirkosp » Wed Mar 13, 2013 10:19 am

That converttoyv12 is useless since your source already is i420.
Get deen, removegrain, and deblock out of the way. The screen from the VOB looks good as far as those are concerned, it just has a minimal grain, but not a bad one, do keep it.
Tweak like that is useless, but you should NOT tweak any source unless you have a very good reason to. If you want to do color correction in your amv, do it in your NLE.
Doing assumefps like that is not going to decimate at all, so you're just slowing down the video while keeping the dups. You should use tdecimate instead.
Assuming the DVD is ITU-compliant (which is likely for this) and that you do need it to 640x480, you should increase the crop to 8,0,-8,0.

So basically:

Code: Select all

mpeg2source("L:\Reborn Bullet 1\KHR Disney 1 - 1.d2v",cpu=0)
tfm()
tdecimate()
crop(8,0,-8,-0)
LanczosResize(640,480)
Is what your script should really look like. When it comes to filtering, less is most often more, unless you know full well what you're doing and you're sure you're not introducing other issues with the filters. If you're unsure about something, you shouldn't fell obliged to add a filter.
Image

User avatar
Kazemon15
Joined: Fri May 09, 2003 9:28 pm
Status: Reborn! Fanatic
Location: AMV Freak, California
Contact:
Org Profile

Re: Scripting Help (mostly for dark scenes)

Post by Kazemon15 » Wed Mar 13, 2013 1:55 pm

Ooh, okay, thanks alot. I always assumed one had to use deen and all that other stuff, but it always kept making my footage worst than the VOB did...

=3 I'll try that and then screencap the results.

Oh I have one more minor question. Whenever I mp4 in zarx, I seem to be losing quality. Let me screencap.

Comparing the filtered screen to the mp4:

Image


MP4:

Image

I'm using an older version the quantizer at 15 on mode constant quality, passes 1, but it keeps looking worst than the lossless. I tried using the newer one as well, but it kept giving me the same results. Is there anyway to fix this when I mp4?

Thanks alot for your help. You're a lifesaver. :up:

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

Re: Scripting Help (mostly for dark scenes)

Post by mirkosp » Wed Mar 13, 2013 2:51 pm

I see you're doing 848x480 screenshots, do you perhaps need to upscale to that? In that case, you could have better results if you upscaled in avisynth first instead of doing that inside the NLE from the 640x480 video. Just ask if this is the case so I'll try to toss up a decent chain for that.
As for the banding, I can see it's absent from the VOB and it's introduced later on.
As you are encoding 8bit, banding is much more easily introduced than if you were encoding 10bit, so extra bitrate is indeed required (crf 15 should be plenty enough). Generally what causes banding and blocks are indeed flat areas of colours such as the ones we have in anime, and in a particularly dark shot like this, it's asking for trouble.
The easiest way to prevent x264 from introducing heavy banding at 8bit, is to add some static grain on the image. Once you export your lossless from your NLE, try to do something like:

Code: Select all

avisource("lossless.avi")
addgrainc(0.6,constant=true)
Should be plenty enough to help out. Higher values can be used, but do note that heavy grain gets in the way of compression too.
Another thing to do, a very important one, is to use sane quantization values. As far as I know, zarxgui uses the tune animation parameter, which is intended for paint-bucket-like american animation (think Simpsons), NOT for anime. The 0.6 aq-strength is way too low. I suggest you to increase that to 0.8 or so (never go lower than 0.7 unless the source allows it), and that also should help preserving gradients.
Image

User avatar
Kazemon15
Joined: Fri May 09, 2003 9:28 pm
Status: Reborn! Fanatic
Location: AMV Freak, California
Contact:
Org Profile

Re: Scripting Help (mostly for dark scenes)

Post by Kazemon15 » Wed Mar 13, 2013 2:59 pm

The MEP is in widescreen format, but the anime footage is both widescreen and fullscreen (fullscreen for about 101 episodes, then the next 102, widescreen), so I crop the fullscreen in adobe because there are times when I want to pan it up and down for effects, ect.
As far as I know, zarxgui uses the tune animation parameter, which is intended for paint-bucket-like american animation (think Simpsons), NOT for anime. The 0.6 aq-strength is way too low. I suggest you to increase that to 0.8 or so (never go lower than 0.7 unless the source allows it), and that also should help preserving gradients.
I don't really understand what you mean here? Do you mean the quantizer? Where can I find the "0.6 aq-strength"? Sorry for all these questions...I never really did tweak around with zarx before, I always just put in the script and mp4ed my amvs.

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

Re: Scripting Help (mostly for dark scenes)

Post by mirkosp » Wed Mar 13, 2013 3:12 pm

In the advanced tab, the VAQ option.
Image

User avatar
Kazemon15
Joined: Fri May 09, 2003 9:28 pm
Status: Reborn! Fanatic
Location: AMV Freak, California
Contact:
Org Profile

Re: Scripting Help (mostly for dark scenes)

Post by Kazemon15 » Wed Mar 13, 2013 3:16 pm

Okay, I see it now. The old one didn't have that. Guess I'll be upgraded to the new one for good.

Thanks for all your help!

I'll try these all out and let you know if it worked. I'm pretty sure it will though. =3

User avatar
Kazemon15
Joined: Fri May 09, 2003 9:28 pm
Status: Reborn! Fanatic
Location: AMV Freak, California
Contact:
Org Profile

Re: Scripting Help (mostly for dark scenes)

Post by Kazemon15 » Wed Mar 13, 2013 10:01 pm

Okay, it seems the new script for cleaning worked really well.

New filter:

Image

Now for the mp4 problem. I tried using addgrainc (0.6, constant=true). I didn't have it, so I downloaded it. I can use addgrainc(6.0), but I can't add "constant=true" to it because it says something along the lines of "addgrainc does not know the argument of the named constant."

Do I need other dll to use this? Thanks.

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

Re: Scripting Help (mostly for dark scenes)

Post by mirkosp » Thu Mar 14, 2013 12:59 am

Well, first, try just to increase the VAQ value. That alone might do it since the source already has a bit of grain. If it isn't enough, then make sure you have version 1.7.0 of addgrainc (it's here).
Image

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

Re: Scripting Help (mostly for dark scenes)

Post by Mister Hatt » Thu Mar 14, 2013 4:44 am

I might just point out that adding grain and using lanczosresize could possibly make it worse. I've seen quite a few dark clips now where adding dither actually makes the banding worse due to the quantizer having a heart attack over it. Something to watch out for. Be very very careful with AQ Strength and QComp settings and avoid over using addgrainc.

Locked

Return to “Video & Audio Help”