Log in

View Full Version : Problems encoding anime


Vassago
20th November 2003, 08:06
I have been trying to encode some Sailor Moon episodes (start laughing now) :) for someone I know off of dvd. I have been using Gordian Knot and encoding with Xvid. I set the size for the final 23 minute file to 175 mb. I have tried every setting I can think of to make the encoding work without blocks showing up in the middle of fast moving scenes. Can anyone give me some pointers when encoding anime. I have searched everywhere in the forums and seen that I am not the only one with problems encoding anime. Are there other programs I should use? Thanks for any suggestions you may have.

Tuning
20th November 2003, 10:56
HI Vassago, Welcome to Doom9's forum

Regardign you problem, one option is use higher VHQ, other is increasing bitrates - so that the bits/pixel value is optimum.But I think you have about 931kbps and 0.13 bits per pixel, which is enough for dark movies.

If you have noise in the video, then you need to put some noise filters.
Most of noise can be removed using special noise filters like Convolution3d. It is present in your GK folder.
If you want to use this filter, then edit avs.
for eg:

LoadPlugin("E:\PROGRA~1\GORDIA~1\Convolution3d.dll")
Convolution3d (preset="animeHQ")

you can have options like :
animeHQ : High quality DVD source,
animeLQ : low quality DVD source,
animeBQ : Bad quality DVD source

You can decide which is the appropriate preset, by previewing avs in media player.

Tuning

Vassago
20th November 2003, 19:27
Will give these a try. Didn't know you could open avs files in Media Player. This will come handy. Thanks, and thanks for the welcome.

Vassago
20th November 2003, 19:32
One quick question. When you suggested increasing the VHQ, did you mean on first pass, second pass, or both? Thanks.

Tuning
20th November 2003, 19:40
Theoretically VHQ should be same in both passes, but the forum experts say that you can select VHQ 1 for pass 1 and higher (VHQ4 too) for pass2. Quality will not be affected.

There are so many threads related to encoding anime, searching will give you something more.., hope you find it...

BTW, what is problem with source, is it noise or anything else..?

[[EDIT]]
I forgot to tell you that the help files of these filters (Some filters that GK uses) are available in Docs folder of GK folder.

Vassago
20th November 2003, 19:53
The quality of the dvd is great and I don't think noise is too much of a problem. I just can't seem to get the artefacts to disappear throughout most of the movie. It's only a 23 min episode, so I figured that 175mb would not be too low. So far, the birate has been around 1000 and I have been encoding at a resolution of 544x400. I have done many searches and haven't really found much related to Xvid encoding and anime. Should I try using a Divx3 or 5.1? Do you think I would have better results? This never was an issue for me with other sources than anime.

Tuning
20th November 2003, 19:58
I would suggest XviD to be used with VHQ4. XviD has better detail level than DivX.

Vassago
20th November 2003, 20:08
Will definitely give that a try then. Thanks.

qwerpoi
20th November 2003, 22:46
Just for fun, try encoding 1-pass quality-based at 100% quality (quantizer 2), and use a small resolution. You'll find that this approach is generally terrible for movies, but works surprisingly well with anime. The point is that you will have almost no macroblocks, at the price of losing sharpness. This really is not so bad with anime, and you can always use post-processing filters (asharp or resize-sharpen in ffdshow) to make it look sharper afterwards. Often you can use 100% quality at a resolution of 512x384 with a good resizer (Bicubic or Lanczos) and fit 2 episodes per cd, and it looks terrific, very sharp with zero macroblocks. For the file size you're aiming for, try a resolution of 448x336 or even 384x288. Most people here would kill me for suggesting such low resolutions, but try it out before you judge, encoding like this is in my opinion superior to many (not all) fansubs out there.

If you find that at 100% quality you still have macroblocks, this means that you may need to try a different codec, since it is not a bitrate issue. If you have b-frames enabled, it might help to disable them, although your filesize will increase dramatically.

manono
20th November 2003, 23:47
Hi-

To follow up on what qwerpoi said; I also suspect a bitrate problem. You're trying to fit too much on the CD at too low of a bitrate. I would first suggest running a compression test in GKnot to get an idea of the final quality. Based on what you've said, your percentage result may be too low (around 50% or maybe even lower). If you still want to keep your resolution, maybe put only 3 episodes per disk. Otherwise his suggestion is a good one-lower the resolution.

colordog
22nd November 2003, 14:31
Like you, I often push the bitrate barrier so that I can get a four or five episode disc to fit on a CD, producing 175 or 140 MB file sizes.

Like above, I've had pretty good results with Convo3D, depending on the cleanliness of the source. Another good way to save bitrate is to use neutral bicubic resize instead of Lanczos. Then, if I want to 'resharpen' the anime, I use aWarpSharp at the default, or just under default (20,2,0.5,0). I find that this does a great job of thickening up the black lines in anime, and doesn't significantly increase affect compression.

Vassago
22nd November 2003, 19:50
Thanks for the suggestion colordog, how do I use aWarpSharp? Is it an included filter with GordianKnot or do I need to download it separately? It would appear that the download page on doom9 is down for the time being.

qwerpoi - I tried your suggestion, the blocks have almost disappeared. My main focus now is trying to resharpen the lines with such a low resolution. I guess I'll try colordog's suggestion. I have tried just about everything within GordianKnot's GUI to sharpen this thing up.

Thanks again for everyone's help.

colordog
22nd November 2003, 21:03
AWS is availalbe here at Marc FD's page (http://ziquash.chez.tiscali.fr/).

You'll have to paste in the filter command after GKnot creates the .AVS file, or click on "Edit" when you're about to hit "Save & Encode" to edit there as well. Often, I encode both a main portion and credits, so edit is greyed-out, and I just use a text editor for the .AVS files.

Be sure to read the "read-me" included with the filter, but the command you'll put in will look something like this:

AWarpSharp(20,2,0.5,0)

For anime, I generally leave the last three numbers the same, and only change the first value, which you can kind of think of as "sharpability", or how much you want to sharpen up outlines. Be sure to preview a few different values so that you won't have to do multiple encodes.

I generally place this filter at the very end of the .AVS file, just before Tweak, if I'm using it.

Let me know how this works out for you!

qwerpoi
23rd November 2003, 02:30
You should be aware that in general, sharpening your file will increase the filesize rather dramatically (awarpsharp is an exception). If you are going to watch the files primarily on your own pc, I highly suggest using ffdshow to play back your files, since it has a lot of post-processing filters. That means you can have a relatively blurry file, which has a low filesize, and sharpen as you play it back (very do-able if your processor > 1GHz). With ffdshow, I recommend using asharp, or if you have a good processor, resize-sharpen (search the forums). ffdshow is kinda buggy and takes a while to get used to, so this may not be the best solution, especially if you plan on watching on someone else's pc. Always remember, though, you can use avisynth itself to post-process your files, so long as you use reasonably fast filters. For example, take a blurry encode, and write the following in a text document:

Avisource("C:\blurry.avi")
asharp(3)

(This script assumes you have asharp.dll in your avisynth autoloading directory, otherwise use the LoadPlugin() command). Save the file as sharper.avs, drag this into your favorite media player, and voila, a sharper file without the larger filesize. Play around with the parameters to get different effects, and play around with some other filters as well (some will be too slow to be used on the fly).

If you do not want to use post-processing filters, I would follow colordog's suggestion with awarpsharp, since this filter can sharpen your file without increasing filesize, but just be careful. The filter is terrific for anime or cartoons because they have lots of flat color regions, but if there are any watercolor backgrounds it can potentially clean away all of the detail. Try to do some comparisons before deciding on any settings.

Btw, just out of curiosity, what was the resolution you ended up using and what was the final filesize?