PDA

View Full Version : No Compression (too much noise)


killerhis
6th April 2003, 16:56
Hi.. i've got a DVD cartoon here and want to convert it into Xvid. When i apply my standaart AVS file (which normaly works good) each eps is then around 600MB(1 eps is around 20min!) The problem is that the source has to much noise. I've applied edeen(), deen() and ATC() (which reduces the noise, but also the quality) but still 1 eps is then 500MB

Can anyone advice me some filters that i can use or add.. it needs to reduce noise (but not the quality) and filesize!! The source is NTSC 4:3


Thankz!

Killer HIS

Dreassica
6th April 2003, 18:44
U better post the AVS script here, so we can see what might be wrong.

Shayne
6th April 2003, 20:01
Dynamic Noise Reduction may be worth a shot

http://members.tripod.co.jp/kiraru2002/

sh0dan
6th April 2003, 21:28
It depends a lot on your source, but:

Convolution3D
FluxSmooth
Temporalsoften (AviSynth 2.5)
Dust (AviSynth 2.0)
StMedianFilter

All smooths in different ways, helping compression. Try them out, or search the forums.

killerhis
6th April 2003, 23:37
mmmmmmmmmmmmmmmmmhhhhhhhhhhh... well the only new filter that I havn't work with is DNR2... but I'm gonna try all the smoothers.. and hope to get it fixed... but the source has A LOT OF NOISE... that's why i can't get it compressed!

still more post would be welkom :D

WarpEnterprises
6th April 2003, 23:42
Maybe there is some other thing wrong because the compression you get seems REALLY bad?
(wrong IVTC)

Can you describe the kind of noise?
Or maybe upload 2-3 shots?

killerhis
7th April 2003, 00:16
OK... here are some pics... these pics are taking after appling ONLY IVTC.. this is what i use for IVCT:

Function Converting(video)
{
return video.\
telecide(guide=1, blend=false).\
Decimate(cycle=5,quality=3)
}
And here are the pics:

http://home.hccnet.nl/h.chourak/pic1.png
http://home.hccnet.nl/h.chourak/pic2.png
http://home.hccnet.nl/h.chourak/pic3.png
http://home.hccnet.nl/h.chourak/pic4.png
http://home.hccnet.nl/h.chourak/pic5.png
http://home.hccnet.nl/h.chourak/pic6.png

When i used the same script on a other anime eps (also 20 min and same ratio/resolution) i got a filesize of 200 MB!
The only differents is the source!

So anyone got some ideas, advice???

MrBunny
7th April 2003, 01:33
Originally posted by killerhis
OK... here are some pics... these pics are taking after appling ONLY IVTC.. this is what i use for IVCT:

Function Converting(video)
{
return video.\
telecide(guide=1, blend=false).\
Decimate(cycle=5,quality=3)
}


Just as a note, for IVTC of anime sources, you should be using Decimate(cycle=5,quality=3,mode=2) which is Donald's duplicate filter adapting decimate mode and should generally be used with animated sources.

Sh0dan's list of filters is definately a good start to play with. There's plenty of threads in this forum that talks about anime encoding and about how/when to use those filters. The source definately looks noisy, but it shouldn't be something that is completely unmanageable. 2D Cleaner is another popular filter used in anime encoding that you might want to have a look at.

As well, you should post what resolution & resize method you're using (and anything else of interest in your current script).
Every source is different, as well you can see, so no single avisynth script will work for everything.

Mr. B

wotef
7th April 2003, 04:05
don't necessarily expect miracles - maybe this material is just plain hard to compress - in which case, consider downsizing - nothing helps filesize like reduceby2() :P

neuron2
7th April 2003, 05:16
Originally posted by MrBunny
Just as a note, for IVTC of anime sources, you should be using Decimate(cycle=5,quality=3,mode=2) which is Donald's duplicate filter adapting decimate mode and should generally be used with animated sources. I'm not sure what you mean by "adapting decimate mode" in this context. Mode 2 deletes from the longest run of duplicates (as defined by a threshold of difference for declaring duplicates), versus deleting just the most similar frame from the cycle. But mode 2 is required only when the animation is at a low frame rate, such that there are duplicate patterns like 2 2 2 2, or 3 3 3 3. For example, much of Princess Mononoke seems to be animated at 12fps.

MrBunny
7th April 2003, 07:20
@neuron2

Sorry, I wasn't feeling very fluent :o I should still have been more clear, but what I meant is what you said. Basically what I wanted to say was to use mode=2 (or at least consider it). And I guess I am assuming that the anime that is being worked on isn't completely animated at 23.976fps.

Mr. B

sh0dan
7th April 2003, 09:21
I did a very noisy VHS capture - also a cartoon, a little time ago - I'll see if I can dig up the script:

"First pass" (Sorry couldn't find the exact script)

AviSynth 2.0:
-Load AVI (as YUY2)
-Crop borders
-Fielddeinterlace()
-PixieDust (fairly strong)
-mSharpen (not that strong)
-Lanczosresize - in this case down to 512x384 - bicubic may be better in some cases.

- Saved as HuffYUV temporary file.

"Second pass" (AviSynth 2.5)
AVISource("part1.avi")
trim(51,96042)
last + AviSource("part2.avi").trim(313,17384)
converttoyv12()
dup(show=false,copy=true,blend=true,threshold=2)
coloryuv(off_y=-36,gain_y=130,gamma_y=48,opt="coring",cont_u=48, cont_v=48)
temporalsoften(4,8,8,mode=2,scenechange=5)
Actually now it is only the "Dust" filter that is an YUY2 only filter - and since it should be possible to import Dust into 2.5 now - you should be able to run the entire process there.

Anyway - these were the filters bringing the best result to this particular movie - You will probably need some other filters.

WarpEnterprises
7th April 2003, 09:33
would it be possible to upload 5-10 ADJECTANT frames of the position of the last .png BEFORE IVTC, and please generate it as little AVI with huffyuy compression e.g. in VirtualDub to make sure there are no screenshot artifacts.
Then we could actually try filters on your clip.

MrBunny
8th April 2003, 10:03
Originally posted by sh0dan

Actually now it is only the "Dust" filter that is an YUY2 only filter - and since it should be possible to import Dust into 2.5 now - you should be able to run the entire process there.

How? :D

I'd worship you (even more) if you could explain.
Thx.


Mr. B

P.S. Sorry for OT

N_F
8th April 2003, 10:18
I can't be sure, but I'd guess he's talking about warpsharp's LoadPluginEx which can load 2.0x filters in 2.5x and vice versa.

MrBunny
8th April 2003, 11:33
Thanks N_F, it works nicely :)
The link to the relevant thread (for anyone else who's interested is: http://forum.doom9.org/showthread.php?s=&threadid=48160 )

And now I'm off to build you a shrine.

Mr. B

MasterYoshidino
10th April 2003, 05:04
those screenshots are with a lossless compression
png = portable networks graphics, like bitmaps but readable in most operating systems

the source seems grainy textured and will be difficult to compress down without large amounts of spatial smoothing

Acaila
10th April 2003, 13:24
For grainy pictures like this I have found that the WNR (http://forum.doom9.org/showthread.php?s=&threadid=31754&perpage=20&pagenumber=1) (wavelet noise reduction) filter performs very nicely. Looking at those pictures you posted the noise is mostly chroma noise, so that isn't very hard to fix.
The only downside is that filter requires YUY2 because it's originally a VirtualDub filter that you have to import. But using VDub you can find good values relatively easy with the preview mode.

killerhis
10th April 2003, 16:45
well i got the size way down (with 40%) by appling this as noise reduction:

Function Processing(converted_video)
{
return converted_video.\
Undot().\
DNR2(16, 8, 2, 1, 2, 1, type="DNR2").\
edeen(r=5, ty=6, tuv=11, ly=1, luv=2, hqc=true).\
DctFilter(1, 1, 1, 1, .8, .6, .5, 0).\
atc(l=2, c=3, b=6, t=0.5, info=false).\
Convolution3d (preset="vhsBQ").\
undot().\
edeen(r=5, ty=6, tuv=6, ly=1, luv=1, hqc=true).\
DctFilter(1, 1, 1, 1, .8, .6, .5, 0).\
atc(l=2, c=3, b=6, t=0.5, info=false).\
Undot().\
edeen(r=5, ty=6, tuv=6, ly=1, luv=1, hqc=true).\
DctFilter(1, 1, 1, 1, .8, .6, .5, 0).\
atc(l=2, c=3, b=6, t=0.5, info=false).\
aWarpSharp(depth=10, blurlevel=3, thresh=0.5, cm=1)
}

I know that is a lot of filters, but this way there's not a lot of noise, not much (almost not noticably) ghosting and color improving.... can anyone give me some advice to get it more compressed, without getting to much ghosting or detail lost??

Wilbert
10th April 2003, 18:46
I know that dust compresses very good, but I don't know how it performs on anime.

killerhis
11th April 2003, 13:25
well after days and weeks of playing around with avisynth to get the files compressed, the lowest filesize i got was 299MB (at 512x384).. this is only 1st pass (xvid). I can apply 2nd pass, but the converted movie has some ghosting and quality loss!

It looks like that i need to apply something new, well i know that the DVD that I have are remasted versions of VHS tape! Would it be a good idea to apply layering process. I know that it works good on VHS, but would it also work on very noisy DVD's??? And does anyone know where i can find a guide for it??

Thankz