Log in

View Full Version : [Newbie] Postprocessing: round 2


WoodsieLord
18th February 2006, 17:55
Fisrt of all I beg you to perdon me! My english is a crap.
In the last years I've been capturing analog TV sporadically, and reading lots of guides and tutorials. In the last few months I achieved some interesting results, which caused in me an even greater interest in the subject.

I would like to ask for help and suggestions to improve my results, and to be able to work with avisynth, which looks indeed like a very powerful tool.

I think its a good idea to let You know first -what does my sources looks like, what can I do with them, and how I do that-:

Sources: Tv series, almost 100% Anime (with some exceptions like "The Hunt For Red October"). Source is PAL-N, standard analog TV. I don't know if I need to amplify my signal or if this noise level is normal. Anyways I have no choice but to live with that. In fact, that's one of the main reasons I'm asking for help, I want to get rid of that noise! Also, to bettereen the overall postprocessing.[Source Examples] Deinterlaced (http://cablemodem.fibertel.com.ar/shabranigdu/VAN_2.JPG), raw 1 (http://img220.imageshack.us/img220/8340/raw13rj.jpg), raw 2 (http://img220.imageshack.us/img220/1944/raw27dv.jpg), raw 3 (http://img220.imageshack.us/img220/8950/raw38cy.jpg), raw 4 (http://img500.imageshack.us/img500/6287/raw42bg.jpg), raw 5 (http://img69.imageshack.us/img69/7595/raw59nq.jpg), Vid Sample (http://www.megaupload.com/?d=1M090G1F) (10 MB)


capturing & Postprocessing: I'm capturing with VirtualVCR in HuffYuv and postprocessing with virtualdub. Filters I use: internal Deinterlace, delogo (Karel Suhajda), internal smoother (at "3"), internal temporal smoother (at "1"), resize, crop, etc... then DivX as output.
Results look like these: a (http://cablemodem.fibertel.com.ar/shabranigdu/FMA.JPG), b (http://img409.imageshack.us/img409/1517/54fh.jpg), c (http://img409.imageshack.us/img409/5036/45lc.jpg), d (http://img409.imageshack.us/img409/7020/37sl.jpg), e (http://img409.imageshack.us/img409/1661/24ly.jpg), f (http://img409.imageshack.us/img409/9683/15so.jpg) (check the difference with a Dscaler snapshot (http://img381.imageshack.us/my.php?image=tv20050905021018007ws.jpg). I'm bluring too much, and the colors are quite diferent! Is it possible to get same results as Dscaler with avisynth?)


So! I started a new adventure searching for knowledge, tools and filters! I would like to get less blured results trying other methods... this is a nice oporunity to learn Avisynth. My main guide right now is the avisynth postprocessing guide, and avisynth.org and 100fps.com as references. I got stuck looking for some plugins like PixieDust and LoadPluginEx.dll. There are lots of old plugins that require this dll to work properly.
What smoothers (also called Denoisers, right?) would you recommend for animated sources? I also tryed GuavaComb to get rid of the chroma noice here (http://img500.imageshack.us/img500/6287/raw42bg.jpg) without any success at all.
Should I be following some kind of 'Steps' that tells in which order I should proceed building a script? (ie: deinterlace first, smooth second, resize third. What about De-Logo, cropping, luma changes, comercial cuttoffs? etc...)
Any advice will be very appreciated!

Thanks in advance.

Mug Funky
19th February 2006, 04:07
anime looks to be very poorly standards converted. there's slight "staircase-edges" from a too-simplistic resizing of an interlaced picture... nothing you can do anything about really.

stuff you can do something about (but may need to spend some $$):

- there's coloured rainbows on edges i'm sure you've noticed. they're a tad strong, but can be reduced with a better comb filter. this probably means a more expensive capture card.. but seeing as this stuff's already been captured, you're going to have to filter it. DeDot for the luma and bifrost for the chroma are a good place to start, but they may not be strong enough. some of MF's tools could help though - mftoon, blindderainbow (was that his?), etc. they're slow though, but forum searches should reveal where these scripts are and how to get them working.

- the picture is a little blurred horizontally. better cables could help here, but probably not. living closer to the broadcaster helps too, but that's usually not something that can be done easily... to filter it back into shape you could try limitedsharpen and fastlinedarken to fudge it a bit (works well on anime).

- the gain is way too high on the family guy stuff. you can't fix this on the already captured video, but it's something to keep in mind in the future - it's better to be too dark than too bright. too dark means S/N ratio suffers a tad, but on analog stuff that's quite acceptable. too bright means detail is lost and will never be back, and that's not acceptable :)

of course, you could always get the DVDs and back them up. a better source is always good. anime on DVD is getting better quality all the time. there's only a few shows that let the analog crap in (FMP fumoffu, earlier saiyuki and scrapped princess come to mind... of course there's always going to be standards-conversion if you live in PAL land, but a shrewd choice between NTSC and PAL DVDs can help there (sometimes the PAL one is better, sometimes the NTSC one. with series titles you can bet on the NTSC one with few exceptions).

WoodsieLord
20th February 2006, 03:17
Thanks a lot for the help Mug Funky!! The information came really handy :thanks:

About the chroma noise and rainbows, this is what I've done with Bifrost and SmartSSIQ:
before (http://img90.imageshack.us/img90/5273/dibujo7px.png) | after (http://img90.imageshack.us/img90/1126/dibujo29fe.png)
Vdub encoded that to HuffYuv @ 0,6 - 2 FPS (according to VirtualDub), shocking...

Afterwards I started playing with TemporalSoften, undot; and lately with FFT3DFilter, aWarpSharp, FastLineDarken (works wonders just like you said) and LimitedSharpen (also this one works great).
Now I have to say I'm impressed, the results are really nice!
source 1 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a1.JPG) | processed 1 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b1.JPG)
source 2 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a2.JPG) | processed 2 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b2.JPG)
source 3 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a3.JPG) | processed 3 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b3.JPG)
source 4 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a4.JPG) | processed 4 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b4.JPG)
source 5 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a5.JPG) | processed 5 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b5.JPG)
Some samples:
Low motion scene (http://www.megaupload.com/?d=N38IFHP8) 1.1 MB | high motion scene (http://www.megaupload.com/?d=UU49J702) 8.35 MB (Samples are in DivX at 8000kbps)


After playing with those scripts for a while, I updated my 'beta' script as follows:

avisource("X:\path\file.avi")
Import("X:\path\SmartSSIQ.avs")

# [ Trims ]
# Trim(1315,5945)+Trim(8346,19804)+Trim(22695,41030) #a whole episode without commercials

# [ Crops ] 720x432 -> 640x384
Top=72
Bottom=72
Left=0
Right=0
Crop(Left, Top, -Right, -Bottom)



ConvertToYV12()
SmartSSIQ()
ConvertToYV12()
BiFrost(interlaced=true)

TomsMoComp(1,15,1)
TemporalSoften(4,4,8,15,2)

ConvertToYV12()
FFT3DFilter(sigma=1,bt=3,bw=32,bh=32,ow=16,oh=16)
undot()

aWarpSharp(depth=16,cm=1)

FastLineDarken()
LimitedSharpen()

Lanczos4Resize(640,384)

Afterwards, I dared to try going forward a bit more, to Xvid/divX encoding. Too bad I got stuck with new problems. Encoded files with much motion have blocks everywhere! and also some details are getting smoothed. Is the bitrate too low? I made some tests with DivX(5.0.5) and Xvid, in 950kbps and 1266kbps. I think that should be enough for anime, right? I took some frames to compare:
Note: Sources come from my beta script, without the Channel Logo which was removed by DeLogo in Virtualdub.

Source 1 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a6.JPG) | divx 1266kbps 1 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b6_divx_1266kbps.JPG) | xvid 1266kbps 1 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/c6_xvid_1266kbps.JPG)
Source 2 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a7.JPG) | divx 1266kbps 2 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b7_divx_1266kbps.JPG) | xvid 1266kbps 2 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/c7_xvid_1266kbps.JPG)
Source 3 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a8.JPG) | divx 1266kbps 3 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b8_divx_1266kbps.JPG) | xvid 1266kbps 3 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/c8_xvid_1266kbps.JPG)
Source 4 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a9.JPG) | divx 1266kbps 4 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b9_divx_1266kbps.JPG) | xvid 1266kbps 4 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/c9_xvid_1266kbps.JPG)
Source 5 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a10.JPG) | divx 950 kbps 5 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b10_divx_950kbps.JPG) | xvid 950 kbps 5 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/c10_xvid_950kbps.JPG)
Source 6 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/a11.JPG) | divx 950 kbps 6 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/b11_divx_950kbps.JPG) | xvid 950 kbps 6 (http://cablemodem.fibertel.com.ar/shabranigdu/captures/c11_xvid_950kbps.JPG)

Note 2: I encoded 2 clips, boths in Xvid and DivX: One with the girl talking without moving (pics 5 & 6), another with a little space combat (pics 1 - 4).
Gspot shows interesting Bitrates in the DivX clips: In the girl clip, bitrate is ~400kbps, while in the space combat clip is 2196kbps! The Xvid versions, boths bitrates round 1260kbps. What's going on?

What Should I do to encode them properly? Maybe there's some noise left (that makes compression poor and abrassive) that I should take care first?

Thanks a lot!!