PDA

View Full Version : Encoding Dragonball Z


Xicor
12th March 2006, 08:54
I'm encoding Dragonball Z right now, and I noticed the source was terrible. I came up with a nice way on Avisynth to remove the grain and video noice by blurring and smoothing the video gently, then using LimitedSharpen to darken the edges. The video is shaky, but I guess nothing can be helped there. There are a lot of rips and lightening that take place on the top and bottom of the video, but this can be easily (but time-consuming!) fixed by using a tool like TMPGEnc or YATTA. The only problem left is with the annoying spots that will appear on certain frames. I'm sure a lot of people have tweaked with this material in the past, so I look forward to some hints and tips!

BTW, this is an example of the script I am using (I always modify it so I will try to keep you guys updated :))

import("c:\xicor\encoding\tools\avisynth 2.5\plugins\limitedsharpen.avs")
avisource("C:\Documents and Settings\HP_Administrator\Desktop\DBZ_1_Vegeta_Saga_tpr_vfapi.avi")
converttoyv12()
Blur(1.0)
org = last
org_u = utoy(org)
org_v = vtoy(org)
msharpen(threshold = 10, mask=true)
reduceby2()
greyscale()
uv = blur(1.5).levels(0,2.0,255,0,255).blur(1.5)
filtered_u = org_u.blur(1.5).blur(1.5).blur(1.5).temporalsoften(2,255,0,3,2)
filtered_v = org_v.blur(1.5).blur(1.5).blur(1.5).temporalsoften(2,255,0,3,2)
u_final = MaskedMerge(org_u, filtered_u, uv)
v_final = MaskedMerge(org_v, filtered_v, uv)
ytouv(u_final, v_final, org)
convolution3d(preset="animehq")
hqdn3d(3)
limitedsharpen(7)
Crop(16,0,-12,0)
lanczosresize(640,480)
tweak(sat=1.1, cont=1.2)

*The part in red is a rainbow-remover.




And here is an example of the "spots" I am talking about:
http://img78.imageshack.us/img78/5493/spot5os.jpg
You can see one beside the bigger cloud over Goku's head. It doesn't look like much, but in motion it is annoying.



Here is a ~30m second video showing what I could accomplish with the script above. (http://rapidshare.de/files/15296009/dbz_x264_take4.avi.html) (Not Frame-Edited)


===================================================================

BTW, my friend has also been encoding DBZ (for a while actually). We compared two of our pics. I'd like to know your opinion on which one is better, but the thing is, I tried tweaking in avisynth to get a similar picture as him but I didn't succeed to do so. It isn't the exact same picture, but you get the idea ;)


Me:
http://img91.imageshack.us/img91/8437/snapshot200603120238162zx.jpg

Him:
http://img91.imageshack.us/img91/8936/snapshot200603120237578nb.jpg

Note, we are using different dvds. I am using the new Ultimate Uncut DVDs, and he is using the old ones.

Jeremy Duncan
12th March 2006, 09:29
Your using a different gamma calibration than your friend ?

I like your better at first glance, but I see the red's and green's are better on your friends picture.
I also see some banding in the water on both pictures.

Xicor
12th March 2006, 09:31
Any good ideas how I could make mine look more like his? (After examining his, I also thought it looked better)

Jeremy Duncan
12th March 2006, 09:49
To get rid of the banding. It's all about how you calibrate your gamma color. It (gamma correction) can ruin, or make your video better.

foxyshadis
12th March 2006, 09:55
The problem is that you're not using .rm, 160x120, at 32 kbps, with 3 doors down music, like all the best dragonball rips.

(Sorry, I'll try to be more constructive next time. :p)

For rips and tears, try DeSpot. It takes a bit to tune it just right, but it works quite well once it is.

Maybe you need to push red a little into blue (u channel) and yellow into green (v channel), via coloryuv's off_u and off_v, but you have to be careful with that. Anyway, coloryuv is your one-stop color correction filter, if you need more than what tweak gives you.

Tops and bottoms, ugh, I have LD rips that have that problem. Haven't started working on them, but my guess is to mask of the buttom and give special temporal luma stabilization processing to them.

Chainmax
12th March 2006, 18:58
If I'm not mistaken, that rainbow remover you're using is sh0dan's rainbow killer. You'd be much better off using Bifrost, Decross or FFT3DFilter/FFT3DGPU instead. Read this thread (http://forum.doom9.org/showthread.php?t=102162) for more info.

xDrJx
12th March 2006, 21:20
Yeah, the dbZ DVD's I own are horrible source material, but I never noticed any of those spots.
Maybe because they are an Australian version. For encoding I used a simple script

Undot()
DeGrainMedian()
DeGrainMedian()
MSharpen(dunno settings)


http://img489.imageshack.us/img489/1489/dbz12kl.jpg (http://imageshack.us)

http://img296.imageshack.us/img296/1407/dbz26sp.jpg (http://imageshack.us)

http://img489.imageshack.us/img489/2700/dbz33nc.jpg (http://imageshack.us)

Xicor
13th March 2006, 00:14
Here is a M2V (http://rapidshare.de/files/15358877/DBZ_1_Vegeta_Saga_doom9.demuxed.m2v.html) file. Good luck;)

xDrJx
13th March 2006, 10:46
buah, nice source clip. I won't trade your DVD's for mine:D But I just own some starting from the Android Saga. I did and XviD encode using the following script

mpeg2source("D:\DBZ_1_Vegeta_Saga_doom9[1].demuxed.d2v")
TomsMoComp(1,5,1)
crop(16,0,692,476)
LanczosResize(640,480)
Undot().Deen()
DeGrainMedian()
DeGrainMedian()
LimitedSharpen(Strength=50)


http://img79.imageshack.us/img79/1676/dbz18ok.jpg (http://imageshack.us)

http://img88.imageshack.us/img88/975/dbz29vj.jpg (http://imageshack.us)

http://img81.imageshack.us/img81/4135/dbz33yh.jpg (http://imageshack.us)

For my taste I'd stick with that, but I dunno much about this fancy scripting you did anyway.
The "brown spot" is barely visible and I just found it in a frame-by-frame count.

foxyshadis
13th March 2006, 11:18
This is an example of the perfect source to use vmToon on too, for smoothing and sharpening, I forgot to mention. ^_^ (Comes with masktools2.) It works best on very cartoony shows like DBZ, and it's better tuned and faster than just adding a bunch of denoisers and LS. You'll love how crisp and clean it looks. For example, I used on a cowboy bebop vcd cut:

import("vmtoon.avsi")
vmToon(ssw=2,ssh=2,strength=48,xstren=128)

And if you open the avsi it has a mini-documentation next to the arguments. It doesn't look like you need a rainbow removal, fortunately. If you need any edge-halo removal, don't forget to try dehalo_alpha before you try to smooth it away.

Xicor
13th March 2006, 18:33
Well thanks everyone! I'll use what you gave me and upload some clips to show you what i was able to do:cool:

Xicor
13th March 2006, 21:14
Someone recommended me to use field bob (vdub filter) to help with the shaking of the video. Is there an avisynth version of it, because I am using MeGui...

@ xDrJx
Your script seems to create a lot of macroblocking and artifacts (You didn't smooth it or anything). Here is an example of a nasty frame:
http://img70.imageshack.us/img70/9794/snapshot200603131626065ha.jpg

and BTW, here is a pic which shows that there is some rainbowing (look at Bulma; blue-haired girl):
http://img145.imageshack.us/img145/4109/snapshot200603131632288hd.jpg

Mug Funky
14th March 2006, 01:26
ugh. DBZ. the bane of many a DVD author's existence (well, one, and he quit last week).

the uncut and "remastered" edition seems to have simply had a temporal soften run on it. some of the old release were like this too. this kind of smoothing can sometimes make further smoothing difficult because it makes the (significant) noise more corellated and therefore harder to distinguish from good signal. de-shaking can help here though, but details will be lost (probably doesn't matter - the backgrounds are nothing to pause the disc and stare at for hours, like you get with higher budget anime).

you'll probably need heavy deblocking for the action scenes - all those flying/flashing diagonal black lines are hell for mpeg-2.

but in my opinion the source isn't really worth it. people don't watch DBZ because it looks good :)

[edit]

you could also wait for funimation to release it again, less cut and more remastered. i'm sure they will - they can't get enough of this series... sort of like ADV and Evangelion.

Xicor
14th March 2006, 01:58
I really like DBZ, and besides, encoding this is kinda like practice.