Scripting Help (mostly for dark scenes)

This forum is for video and audio help and discussion.

Scripting Help (mostly for dark scenes)

Postby 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.
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby 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
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Scripting Help (mostly for dark scenes)

Postby 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:
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby 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
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Scripting Help (mostly for dark scenes)

Postby 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.
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby mirkosp » Wed Mar 13, 2013 3:12 pm

In the advanced tab, the VAQ option.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Scripting Help (mostly for dark scenes)

Postby 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
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby 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.
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby 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
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Scripting Help (mostly for dark scenes)

Postby 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.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: Scripting Help (mostly for dark scenes)

Postby Kazemon15 » Fri Mar 15, 2013 12:12 am

Alright, I set the VAQ to 0.8 and used the addgrainc(6.0) filter and got this for the MP4:

Image

A little better, but it still has some banding issues.
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby Mister Hatt » Fri Mar 15, 2013 4:35 am

Raise qcomp to 0.8, lower aq-strength to 0.7, and use CRF mode encoding. Potentially LOWER the addgrainc setting a bit too. There is some initial blocking in your video but the grain you're adding is making x264's quantiser cry a bit. By tuning the adaptive quantiser settings and lowering the frame complexity, you can stop x264 from shitting all over it. Basically your cleanup for the initial blocking is causing the banding.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: Scripting Help (mostly for dark scenes)

Postby mirkosp » Fri Mar 15, 2013 6:29 am

Mister Hatt wrote:Raise qcomp to 0.8

That's getting pretty high. Might as well use constant quantizer. Which is dumb.
Though raising it to 0.7 should still help over the default 0.6.
@Kazemon: go to the command line tab and add:
Code: Select all
--qcomp 0.7

and use CRF mode encoding

He already is, one pass quality based in zarxgui is crf.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Scripting Help (mostly for dark scenes)

Postby Kazemon15 » Fri Mar 15, 2013 1:01 pm

Sorry, the addgrainc was a typo, switch the 6 and the 0, it's actually 0.6. I couldn't change it due to no edit button and when I was typing this, I didn't check over it until after I posted.

Okay, I'll try that. And I'm a girl. :sweat: Thanks for the help. I'll try it and respond back to see how it worked.
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Re: Scripting Help (mostly for dark scenes)

Postby Kazemon15 » Fri Mar 15, 2013 1:31 pm

Alrighty, it's getting there, slowly but surely. =3

Image

I'm wondering if it could be my other settings? I'll put everything down.

I have in the script:
Code: Select all
avisource("filename.avi")
addgrainc(0.6)


My settings are:

Container: MP4
Mode: Constant Quality
Present: Very Slow
Quantizer: 20
Tune: Animation
Audio: AAC (Bitrate)
Bitrate: 128
VAQ: 0.8
Custom x264 Command: -qcomp 0.7

and that's everything in regards to my settings.
Currently replaying/recording: Tales of Vesperia (Xbox360) and Tales of Graces F (PS3)
ImageImage<-- Now available
Image
User avatar
Kazemon15
 
Joined: 09 May 2003
Location: AMV Freak, California
Status: Reborn! Fanatic

Next

Return to Video & Audio Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron