View Full Version : another anime xvid thread
helix
22nd June 2004, 06:15
I'm having some real troubles with encoding anime into xvid. I've looked at just about every thread thats been posted on these fourms regarding anime, and I still can't seem to get my video to look very good. I'm not using a .avs, but insted a VFAPI. Yes, yes, I know it's old and slow but I'm seem to be getting slightly better results as of right now and it's simpler. I'm sure I'd get better ones if I wasn't a noob to avisynth and script editing. The particular show I'm encoding is Lodoss, which is a DVD rip of my own, (I used DVD2AVI to make .dv2) so the source is realativly clean but lodoss is an older show so I need quite a few filters to reduce noise, better the color and increase sharness. I'm trying to get each episode around 175Mb, so I can fit four to a disk. I realize I could probally have better filters with avisynth and make it look better and get faster encode times at the same time, maybe someone could explain script editing to me, or at least what filters I should use in there. I know from the threads that a few of you guys have done older shows. I'm also encoding an entire CD of the box set, six episodes at a time in one big stream, which perhaps isn't such a good idea. Maybe I should just do them one by one. I'm not sure if I should disable B-frames or not since they increase quality. I'd like to stick with Xvid and not move to Divx or RV10 but Xvid is really starting to annoyed me, although sirber's RealAnime looks promising.
Here are the Xvid settings:
Motion Search Precision: 6 - Ultra High
Quantization Type: - H.263
VHQ: 1 - Mode Decision
Maximum I-frame Interval: 300
Minimum I-frame Interval: 1
Chroma Motion: enabled
Maximum B-frames : 2
B-frame Quantizer ratio: 150
B-frame Quantizer offset: 100
B-frame Threshold: 0
DX50 B-VOP compatibility: enabled
Min I-frame Quantizer: 2
Max I-frame Quantizer: 31
Min P-frame Quantizer: 2
Max P-frame Quantizer: 31
I-frame boost %: 0
Discard first pass: enabled
Below I-frame distance: 10
I-frame bitrate reduction %: 20
High bitrate scenes %: 0
Low bitrate scenes %: 0
Playback with Bias
Curve aggression: Medium
High distance from average %: 200
Low distance from average %: 100
Automatic minimum realative quality strength %: 50
Leak
22nd June 2004, 10:19
Originally posted by helix
Curve aggression: Medium
High distance from average %: 200
Low distance from average %: 100
Automatic minimum realative quality strength %: 50
Just one comment - if you've really got those options in your config dialog, you're using a prehistoric version of XviD.
Try using the current version (http://www.koepi.org/), you might even get better quality with it...
np: Jah Wobble & Deep Space - Five Beat Pt. I (Five Beat)
EDITED by Koepi: hey, I've a new domain now, just remember "www.koepi.org" ;)
sysKin
22nd June 2004, 10:26
Exactly how ancient xvid are you trying to use here?
[edit]Oh look, I should have reloaded the page before answering ;) Leak was here long before me.
lordadmira
22nd June 2004, 10:37
Greetings fellow anime encoder.
First off u should upgrade to version 1.0.1 which is out now. I assume by "VFAPI" u mean Virtual Dub? Ur basic settings seem ok though I would set the Curve and I frame stuff back to defaults, enable VHQ 4, Trellis, Chroma Optimizer, GMC, and Adaptive Quantization. I haven't seen the original Lodoss War so I don't know what kinds of motions it has. That only matters if u want to tweak the B frame settings. If there aren't many moving objects u might get better quality by disabling BVOPs. If u aren't sure just leave it at defaults.
Cleaning up grungy video is a piece of cake, I do it every week when I encode my Inuyasha eps. :D Assuming ur using Virtual Dub u can use these filters:
VirtualDub.video.filters.Add("smoother");
VirtualDub.video.filters.instance[1].Config(750,1);
VirtualDub.video.filters.Add("temporal smoother");
VirtualDub.video.filters.instance[2].Config(3);
VirtualDub.video.filters.Add("warp sharp");
VirtualDub.video.filters.instance[3].Config(76, 2);
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[4].Config(640,480,7); U only have to obtain the Warp Sharpener filter, the rest are built in. The smoothers get rid of static and grain and warp sharp makes the lines more crisp. Finally u resize into 4:3 aspect ratio. Play with the filter intensities until it looks just right; they should be as low as possible. If it's interlaced then u want to use Smart Deinterlacer. If it's telecined try the built in inverse telecine function. If that pukes then u can try Telecide or other IVT filters out there on the Net. If no IVT filters/settings seem to work out u can just use Smart Deinterlacer on it.
After u get that setup u'll want to do a 2-pass encoding. The only wildcard is the B frames. Depending on the source material they can help a lot or be totally useless. Since u want to get rather small file sizes it's probably best to leave them be. Also u might have to reduce the resolution to get good quality at that low of a bitrate.
LA
edit: Wow, 3 people replied in the time since I started writing. :P
helix
22nd June 2004, 11:52
I was almost certain I was using Xvid 1.01 guess I should try to reinstall. :confused: By VFAPI I mean the frameserver. I'm just converting the .dv2 from DVD2AVI into a pseudo-AVI using vfapi convert. perhaps I should update this whole process and move to .avs, though i wouldn't prefer it. I don't have any trouble with the filters, it's just the encoding times that i'm worried about. Right now in virual dub i'm gettig about 8-13Fps. With 2 hours and 30 mins of video to encode with 2 passes. It takes about 13 hours, so i'm looking for anything that will decrease that. The six filters I was using with lodoss were: (listed in no specific order)
Deinterlace
Null transform
Resize to 640x480 - lanzos3
Warp sharp
Smoother
Brightness and contrast
I'll try the ones you listed and see if i can get better picture quality with less filters to minimise time. And I assume by upgrading to 1.01, if I do indeed have a older version, will shorten encodes times a bit. But thanks for the replies1. I think I can finally make some progress on this huge pile of anime I have lined up to encode, lodoss and a few other shows.
lordadmira
22nd June 2004, 11:59
Speed wise I don't think u have anything to complain about. A 2 pass encode of one Inuyasha ep takes 9-10 hours on my system. Instead of deinterlacing I would really try to get IVT to work. That will lower the framerate to 23.976 fps and make achieving 175 MB more realistic.
Koepi
22nd June 2004, 12:01
vfapi involves at least two colour space conversions.
So using avisynth in YV12 color space will save you plenty of time by not converting the color space. Also, the filters work faster - they're more optimized _and_ operate on less data (staying in the yv12 colour space... ;) ).
Needless to say, the eyes of some hundred testers verified the YV12 chain has a better visual result when encoded.
Koepi
helix
22nd June 2004, 12:59
Originally posted by lordadmira
Speed wise I don't think u have anything to complain about. A 2 pass encode of one Inuyasha ep takes 9-10 hours on my system. Instead of deinterlacing I would really try to get IVT to work. That will lower the framerate to 23.976 fps and make achieving 175 MB more realistic.
Wow, I guess I don't. What speed is your CPU running at? I' at 2.5Ghz on a XP2400
Leak
22nd June 2004, 13:06
Originally posted by Leak
EDITED by Koepi: hey, I've a new domain now, just remember "www.koepi.org" ;)
True, but since it only stuffs your old address in a frameset it's hard to link directly to subpages - and I didn't want to take chances with him missing the XviD binaries page... ;)
np: Giardini Di Miro - Pearl Harbor (Hits For Broken Hearts And Asses)
Koepi
22nd June 2004, 13:55
Sorry for the OT again, but http://www.koepi.org/xvid.shtml works perfectly ;)
N.P.: the noise of my keyboard and the practicant next to my work place. Somewhat industrial. I _hate_ industrial.
Leak
22nd June 2004, 14:37
Originally posted by Koepi
Sorry for the OT again, but http://www.koepi.org/xvid.shtml works perfectly ;)
N.P.: the noise of my keyboard and the practicant next to my work place. Somewhat industrial. I _hate_ industrial.
Oh, well then it's a bit of a more advanced redirect than what I'm used to... still, going to www.koepi.org, then to your binaries page and choosing "Show only this frame" in Mozilla lands me at your old URL, and that's what I used.
But I guess the discussion is moot and a bit off-topic, too... ;)
np: Two Lone Swordsmen - Driving With My Gears In Reverse (From The Double Gone Chapel) + 2 servers making quite a lot of fan noises... :(
(Not really industrial, but with a lot more guitar and vocals than their earlier, more electronic albums - not that that's a bad thing... :))
helix
22nd June 2004, 17:18
Originally posted by lordadmira
Speed wise I don't think u have anything to complain about. A 2 pass encode of one Inuyasha ep takes 9-10 hours on my system. Instead of deinterlacing I would really try to get IVT to work. That will lower the framerate to 23.976 fps and make achieving 175 MB more realistic.
What's the difference between using IVT and enabling "forced film" in DVD2AVI? I've never used IVT for any of my anime SVCD encodes, would you explain?
MasterYoshidino
22nd June 2004, 23:26
by "IVT" do you mean "Inverse Telecine"?
Most anime is manually telecined onto NTSC format. That means that two out of every five frames are encoded into MPEG-2 interlaced, which reduces the quality of the frames even when properly deinterlaced and matched. When anime is flag based telecined (few anime are done this way) the original quality of the frames is fully retained as the telecine process is done via the decoder and not the encoder. Most of the time you will have to IVTC unless your source is truly telecined like hollywood movies are (via flags). Then force film is common sense. Kind of like how the quality of subtitle's edges are better if you softsub rather than hardsub, same concept to "soft telecine" (via flags) or "hard telecine" (via hardcoded telecine).
lordadmira
23rd June 2004, 01:44
Originally posted by Koepi
Sorry for the OT again, but http://www.koepi.org/xvid.shtml works perfectly ;) Actually it doesn't. Clicking on the Xvid binary throws a cog on ur site. "Your browser didn't send the correct referer for my site" U have to explode the frame and then click the link to get Xvid.
StainlessSteel
23rd June 2004, 02:05
I just got Armitage III Poly-Matrix (http://www.amazon.com/exec/obidos/tg/detail/-/B00012QLQE/qid=1087952231/sr=1-2/ref=sr_1_2/103-1851739-5539026?v=glance&s=dvd) sent from the US. It's an old movie, like Ghost in the Shell or Lodoss War. Therefore it has much noise, too. So I wonder, if attaching a medium-noise filter would decrease the color quality.
Another question. Is DGIndex (DVD2AVI) always right about the AR? I also got this letterbox Shrek DVD, but DGIndex says it's 16:9; that's why I wonder. What input AR should I state in GKnot for as letterboxed widescreen movie which isn't really "16:9 anamorphic".
By the way, is the "cartoon mode" really any good for anime? For example, Trigun has a lot of dusty scenes, so I would say "cartoon mode" isn't that helpful in that case, or?
Stainless
lordadmira
23rd June 2004, 03:40
Originally posted by helix
What's the difference between using IVT and enabling "forced film" in DVD2AVI? I've never used IVT for any of my anime SVCD encodes, would you explain? I've never used DVD2AVI so I couldn't say. But if it can preempt this whole telecine problem then go for it. But Inverse Telecine is the process by which telecining is undone. Telecining turns 23.976 fps material into 29.97 fps material by unstitching one frame and weaving it into two frames. You can tell if u have telecined material if u have three normal frames followed by two "interlaced" frames. There are numerous technical explanations of this online. The problem with IVT is that a lot of times the telecining is done wrong in the first place which vastly complicates the reverse process. A super video CD is usually interlaced so u wouldn't encounter IVT when dealing with that. If u see interlacing artifacts after u do the IVT process then the source was made wrong. I've heard rumors that there are some good adaptive IVT filters out there that might recover from those errors. U might have to run Smart Deinterlacer after the IVT to clean up the artifacts. If u do that, use field based differencing.
I have a Celeron 1400. :D Sheesh ur even running overclocked! Shame on u!
LA
lordadmira
23rd June 2004, 03:48
Originally posted by StainlessSteel
Armitage III Poly-Matrix sent from the US. It's an old movie, like Ghost in the Shell Those aren't old! If they need any filtering at all some light Smart Smoother should suffice.
By the way, is the "cartoon mode" really any good for anime? For example, Trigun has a lot of dusty scenes, so I would say "cartoon mode" isn't that helpful in that case, or? Cartoon mode raises the threshold for detecting motion/changes in a macroblock. So it makes it easier to detect static blocks. I use it in my Inuyasha encodes but I've had it create artifacts in other encodes. It's source dependant. The artifacts turn up when there's high contrast motion. U'll see a "stacking dirt" effect on the surface that an object has passed over. If ur source is very clean then u shouldn't need this.
LA
helix
23rd June 2004, 06:25
So if my source is already 29.97fps there shouldn't be a problem, Right? If I don't use "forced film" which takes it down to 23.976, what is the process I use to get it to come out to 23.976 in Xvid? Just use a telecine filter? I'm definitly getting interlacing artifacs so would using telecine insted of a deinterlacer give better quality?
Well beside that I got a few screenshots I want to post to get opinions on how I can make quality a bit better. From watching fansubs and looking at thier bitrates I can tell I can tell there's some room for improvment. It's not bad, but some of the scences look pretty blocky around the edges on full screen.
Here's it at 640x480
http://www.clanbbw.com/publicimg/data/images/animescreen1.jpg
Here's a close up
http://www.clanbbw.com/publicimg/data/images/animescreenclose1.jpg
Xvid Settings:
Bitrate: 847Kbs
Quantization type: H.236
Quarter Pixel: enabled
B-VOPs:
Max consecutive B-VOPs: 2
Quantizer Ratio %: 150
Quantizer offset %: 75
Motion Search Precision: 6 - Ultra High
VHQ: 4 - Wide Search
Use chroma motion: enabled
Frame drop ratio: 0
Max I-frame interval: 300
Cartoon mode: enabled
Min I-frame Quantizer: 2
Max I-frame Quantizer: 31
Min P-frame Quantizer: 2
Max P-frame Quantizer: 31
Min B-frame Quantizer: 2
Max B-frame Quantizer: 31
Trellis quantization: enabled
Joe Fenton
23rd June 2004, 07:32
As I understand it, cartoon mode is for CARTOONS. Examples would be Yogi Bear or the Powerpuff Girls. You are encoding anime; you shouldn't use cartoon mode for it.
The problem with inverse telecine on modern animation is they mix the animation with computer generated effects. It is easy to see in things like Cowboy Bebop. The animation is drawn and shot on film at 24 FPS, but then telecined and mixed with computer graphics generated at 30 FPS. Cowboy Bebop will look fine in some segments when inverse telecined, then hit a section with computer graphics and start to stutter. You see this often in the scrolling credits at the end of anime. The English credits are computer generated at 30 FPS and don't scroll smoothly when inverse telecined.
Modern animation needs variable frame rates to allow the best encoding. This is an ongoing discussion in many of the forum groups here. Matroska supports VFR, and some folks have written programs to help generate the data needed to do a VFR encode. It's very cutting edge at the moment. The other solution you see are encodes done at 120Hz. They encode the 24 FPS sections by inserting 4 dropped frames for every frame, and the 30 FPS sections by inserting 3 dropped frames for every frame. The TW Naruto encodes are done that way.
Teegedeck
23rd June 2004, 07:45
Anime is not that different from cartoons; use cartoon mode. It doesn't 'flatten' or 'smoother' your anime in a way that would make it look like a Hannah-Barbera cartoon, don't worry. It just adjusts ME's sensitivity to that kind of non-natural material. And there is no way this could create artifacts.
lordadmira
23rd June 2004, 09:15
Originally posted by Teegedeck
And there is no way this could create artifacts. I've seen it. When I tried to encode the FLCL manga sequence with cartoon mode. This sequence is black & white and consists of pans over manga panels. It left a trail of "dirt" where the line drawings had passed by. I think this is because the "background grain" of the panels was not caught by the ME when it should have, due to the threshold change. I seem to remember this being discussed in another thread. I have not seen any artifacts in other anime/ation encodes I've done.
lordadmira
23rd June 2004, 09:33
First u need to upgrade that old Xvid!!
Originally posted by helix
So if my source is already 29.97fps there should be a problem, Right? If I don't use "forced film" which takes it down to 23.976, what is the process I use to get it to come out to 23.976 in Xvid? Just use a telecine filter? I'm definitly getting interlacing artifacs so would using telecine insted of a deinterlacer give better quality?
It's not bad, but some of the scences look pretty blocky around the edges on full screen. Yeah, Virtual Dub has a decent built in IVT function and the Telecide filter is also good. But first I would try that "force film" function. If u can get rid of the telecining at the ripping stage that's ur best bet.
At 175MB per ep there's no way ur going to eliminate blockiness. That's why going to 24 fps is important. U can disable Quarter Pixel, it's just sucking up space that u need for the basic picture quality. Also increase the max I frame to 600 frames, anime can have long staticky scenes so u want to exploit those.
Another filter option u have is to try replacing the standard smoother and temporal smoother with either Smart Smoother or Temporal Cleaner. Those filters might give u better results. Noise reduction is the key since it's effect on anime is so much greater than live action.
LA
helix
23rd June 2004, 10:20
Yeah I got the new version, apparently I had it installed but the old version stayed in the virtual dub list of compressors and didn't change over. Thoes screen shots are from 23.976fps so "forced film" was enabled. I think at this point i'm not going to bother with telecine and just stick with "forced film", unless I can get sweepingly better results using telecine. About thoes filters, are they inherent to Vdub or do I have do download them? But anyway, thanks for the advice about disableing Quarter Pixel and boosting max I-frame to 600, I'll change thoes things and i'll see if I can find thoes filters and post up some new screen shots once I encode.
Soulhunter
23rd June 2004, 18:37
Originally posted by StainlessSteel
So I wonder, if attaching a medium-noise filter would decrease the color quality.For slight denoising, I prefer VagueDenoiser !!!
You could seperate its luma/chroma processing like this...
Clip=last
# Luma denoising
Clip1=Clip.VagueDenoiser( threshold=0.50, method=1, nsteps=6, chroma= false )
# Chroma denoising
Clip2=Clip.VagueDenoiser( threshold=1.00, method=1, nsteps=6, chroma= true )
Clip1.mergechroma(Clip2)
Bye
helix
23rd June 2004, 19:31
Alright, I used Smart Smoother and got the grain to go down a little bit, plus I changed thoes settings - Max I-frame to 600 and disableing Quarter Pixel. Here are the new screenshots, the quality looks slightly better. (these are using "forced film")
http://www.clanbbw.com/publicimg/data/images/lodossscreen.jpg
http://www.clanbbw.com/publicimg/data/images/lodossscreenzoom.jpg
Caspar
24th June 2004, 00:25
@lordadmira
Do you want to share some ideas on how one can deal with mouth combs in anime? I hate removing those manually. It takes me up to 3 hours per 25min Ep to clean those up. I use decomb for all my anime encodes, and I have tried setting a low vthreash with it then use kernaldeint, but the results are always bad. So what I end up doing is disable postprocessing and do the mouth combs manually...
I would be nice if there's another method to go about doing this. It is just way too time consuming.
helix
24th June 2004, 05:45
I did some googleing and came upon this http://www.doom9.org/ivtc-tut.htm
Theres a short passage on anime
"ANIME. Anime is the “I don’t get no respect” bastard child of video encoding. But it shouldn’t be. Because Anime NTSC DVDs are frequently the most difficult to IVTC properly, the greatest skill is required to work with them. As far as I know, for the best results, very few anime movies and none of the OVAs or TV series DVDs should be Force Filmed in DVD2AVI. On the other hand, almost all can be IVTC’d with good results (Neon Genesis Evangelion and Record Of Lodoss War being two possible well known exceptions). With no other kinds of DVDs do you find more strongly held opinions about which IVTC to use and at what settings. So, to avoid the issue entirely, I’ll just recommend studying the .avs carefully in VDub-Nandub before encoding. Know all the possible parameters and settings of the IVTC you choose to use and be prepared to use them. Unless the video stream is very clean, I also recommend using some kind of Deinterlacer to take care of any remaining interlacing of flapping mouths, dark areas, post creation edits, etc."
So maybe I would in fact be better off using IVTC after all. I'd like to try and see if i get anything better, problem is I don't really know how to configure it in avisynth. Should I perhaps use the one in Vdub insted?
Leak
24th June 2004, 11:00
Originally posted by Caspar
(anime mouth-combs)
I would be nice if there's another method to go about doing this. It is just way too time consuming.
Well, I've been taking a different approach here for some time:
I use KernelBob on my anime sources to up the framerate to 59.xxFPS, then I use an AviSynth function I've written (http://desdemona.ssw.uni-linz.ac.at/DBV/Software/AviSynth/MyBobs.avsi) to match every other frame to either it's previous or next frame (whatever has a lower metric based on several different luma differences) and blend those two together yielding a 29.xxFPS video again (kinda like what Telecide does, but by blending upscaled fields rather than just field matching).
This has the added bonus that you just need to tune the threshold on KernelBob (which at a value of 8 worked quite well for any anime source I've used it on yet) but none for field matching; if the match really goes awry (mostly at scene changes, or if there's really really low motion (i.e. just mouths flapping)), you'll get blended frames, which IMHO is much less annoying than combs.
Of course, you'll want to use Decimate after this to remove duplicate frames like you'd do with Telecide...
Works for me at least. Now I just have to find the time to make a proper AviSynth plugin out of it as the YPlaneMinMaxDifferences re-analyze the image everytime even though you can do it in one step per image, which would yield quite some speedup... :)
np: Phoenecia - Jpace (Brownout)
helix
25th June 2004, 15:22
Well I tried using IVTC insted of "Forced film" and I did see slightly better quality as a result. Some of the block noise and fuzziness around the lines decreased. So i'm getting pretty good looking video using Vdub's IVTC, Smart smoother and warp sharp. I am however, still seeing slight interlacing artfacts in people's mouths when they talk. I guess from what Casper and Leak said, Decomb is the best wat to go about removing the artifacts. I've never used it and when I read the directions I found it a bit to hard to understand what I needed to put in my script to do what I wanted it to. Could somebody could post a general script thats used to clean up artifacts?
Leak
25th June 2004, 22:09
Originally posted by helix
Could somebody could post a general script thats used to clean up artifacts?
Well, with Decomb alone you'd use something like
Telecide(order=1) # use order=0 if the result is way jerky
Decimate()
and tweak Telecide and Decimate settings while going through the video with show=true set for them (well, one or another, not both at once) until there's no or almost no artefacts left.
With my script I've linked to above, you just put it into your AviSynth plugin directory and then use something like
KernelBob(1,8) # first parameter is the same as order above
BlendBob(false)
Decimate()
and tweak that 8 (threshold for KernelBob) and probably some Decimate settings.
Of course, my script isn't perfect, since it doesn't take chroma into account when matching fields, which might lead to some color blotches now and then, but I hope I'll get time to fix that next month.
np: Autechre - EP7/Envane (Bogdan Raczynski Remix) (WARP 10+3 Remixes comp.)
lordadmira
26th June 2004, 14:41
Yeah the left over artifacts are a tough bugger. The way I get rid of post IVTC artifacts is by using Smart Deinterlacer in Frame&Field mode with a low/mid threshold. That should clean up the mouth artifacts and leave everything else.
There is a major drawback to using Decimate to lower the framerate, and that is that it doesn't know which frames to drop. It just drops them. This is because it doesn't know the difference between the real original frames and the junk frames. Telecide (the AVS one atleast, dunno about VDub) just unstitches the telecining, that's why u need Decimate to kill the newly made redundant frame. If the telecining sequence changes, u are now throwing away real frames and keeping junk. Like this: RRRJJ -> RRRJ. When it should be: RRRJJ -> RRRR. That's why a good adaptive IVT filter is crucial.
If that DVD is particularly dirty ur going to need a lot of filters to fix it up. Don't be afraid to crank up the smoothing, warp sharp will recover the lines for u. About resizing: the resize should always be the last filter in ur chain. U want the resizer to have the best quality image to work with. Go ahead and enable Cartoon Mode, and don't forget AQ and GMC.
If ur still not satisfied then it's time to start playing with the B frame settings. :devil: Do some experiments with no BVOPs, (Bmax/ratio/offset) 2/1/0, 8/1/0, 28/1/0, with Bsens around 30. Use the settings that give u the best results, extreme (read: non-default) B frame settings can give a dramatic quality boost or put ur encode in the toilet, it all depends on the source. If the video has a high motion compensation potential then u'll get a big boost in size/quality the more B frames there are but if the MCP is low it'll make it look worse. But anime has been known to benefit from extreme settings.
Also at some point ur going to have to decide whether ur going to go with all AviSynth or all VirtualDub filters. Not all the filters are available for both formats.
The next extreme measures u can take to try and make it look better are lowering the resolution and framerate even more. 624x464 and 608x448 will save considerable space and the visual quality will still be high. Those resolutions will save u 69 and 136 macroblocks respectively. The next option of dropping the framerate even lower to 23 or 22 fps is about the last possible resort. Even 15 fps is watchable. :D Actually if u can find out what the original cell animation framerate is u can drop it all the way to there and it will still look perfect. For instance if it was drawn at 12 fps or 18 fps. U'll have to frame through the video looking for non moving frames to find that out.
Aren't u glad u decided to start encoding anime!!
LA
PS: I was flipping back and forth between the first frame u posted and the post-filtered one and I can say u've got it looking noticably better. Needs more Warp Sharp.
helix
26th June 2004, 19:56
Thanks for that post. I'll try to grind away at it this weekend and see what I can get. I'm still quite new to whole telecide - decimate thing so it's going to be a while. Lordadmira, do you think you could do me a favor and possibly post or e-mail me your basic avisynth script? Our sources or probally of a completly different nature, but I'd just like to have a script with all the configurations for the nessisary filters already there. I'm finding it hard to "configure" the filters I myself have put there, so it would be a big help if I could have the fields for filter settings already there and just change them for my video. I'd also hate to change the frame rate and size from 640x480 and 23.96fps, except as a last resort for quality. Another thing is i'm having trouble finding where GMC is, I can't seem to find it in v1.01 under any of the tabs or config settings. But thanks again for that post, I'll work on tring to get that noise cleaned up as best I can. And yes, I'm certainly glad I started anime encoding, i'v only lost half my hair over it!
one more Q, Should I enable Trellis Quantization?
Philk15@stny.rr.com
niamh
26th June 2004, 21:09
If you really want to learn about IVTC and field order then I'd recommend you to download the decomb plugin from there (http://www.avisynth.org/warpenterprises/) and read very carefully all the docs that come with it. It's extensive...the doc by Hakko and manono et al. is compulsory as well, I think it's the one you got by googling :)
Personally I'm a big fan of the convolution3D avisynth plugin(available in the same place), I suggest you try something like
convolution3d("animeHQ") or
convolution3d("animeLQ") or even
convolution3d("animeBQ") if it's really dirty, though you will need some resharpening after :D
To learn about avisynth, you can start studying at http://www.avisynth.org or/and get apps like AVSedit that will spit out a script for you that you can study afterwards to learn faster.
I think too that you might get better results by lowering the resolution, if the output has a lowish bitrate :)
GMC is where AQ and B-vops are, clicking on the "more" tab beside profile@level (global motion compensation)
Yes , you should tick trellis no matter what, at least the majority seems to think so.
Another thing, you don't say which matrix you use(or I missed it), that can make a big difference...a matrix like Mpeg for example can turn nasty on low bitrates...and you could try custom matrices, most come bundled in the XviD folder ... there are plenty of threads about matrices :)
That's my 2 cents anyway ;)
helix
26th June 2004, 22:19
Thanks for that info on avisynth. I'm using H.263. I tried using MPEG with a CG-animimation matrix and it didn't really look all that great, so i'm sticking with H.263. Maybe I should use MPEG with another matrix? I fianlly noticed GMC. In the previous version I had, GMC was just shown as "GMC". but in v1.01 it's shown as "Global Motion Compensation" so i got a tad confused while hunting around for "GMC".
lordadmira
27th June 2004, 12:29
I'm using Virtual Dub for my filtering right now so I don't have any AviSynth scripts. VDub is better for tweaking and tinkering because of the GUI. It's a real pain with AviSynth. But once u have a "standard procedure" AviSynth is good.
I posted the Virtual Dub piece already, above. Here's the deinterlacing piece I used for encoding a music video.
VirtualDub.video.filters.Add("smart deinterlace (2.7 beta 2)");
VirtualDub.video.filters.instance[0].SetClipping(4,0,4,0);
VirtualDub.video.filters.instance[0].Config(0,0,20,100,0,0,0,0,1,0,1,1);
VirtualDub.video.filters.Add("smart smoother (1.1)");
VirtualDub.video.filters.instance[1].Config(5, 25, 0);
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[2].Config(632,480,7); Another thing about resizing, if ur cropping the video u don't need to resize to 640x480. Vertically no change is necessary, so if u cropped to 476 u can just leave it at that. Horizontally, the original (720) needs to be reduced by a factor of 1.125 to achieve the 4:3 aspect ratio. So if u crop to 715 for example 715 / 1.125 is 635.55.. or 636. U always need to round it to the nearest even number.
U should stick with the H263 matrx.
LA
helix
27th June 2004, 12:57
Oh, ok. I though you did your filtering in avisynth. Thanks for that list and the resize info.
kitanai
28th June 2004, 14:01
Ok, I see there is some speed and filter discussion going on...
I am also trying to encode an animation file.
However, encoding is VERY slow on my P4 2.8 GHz: 8fps
My DVD backups encode at 50fps(1st pass) and 24fps(2nd pass).
Is that due to all the filtering???
I use the following AviSynth script which was originally created by GordianKnot and manually modified. The source file was captured from TV.
# SOURCE
avisource("E:\noir_src.avi", pixel_type="YUY2")
Trim(1802,32450) ++ Trim(37606,43460) ++ Trim(43467,43468)
Telecide(order=1,guide=1).Decimate()
# CROPPING
crop(16,82,688,412)
Convolution3d(0, 32, 128, 16, 64, 10, 0)
FluxSmooth(7, 7)
# RESIZING
LanczosResize(560,336)
Undot()
Levels(0, 1.1, 255, 0, 255)
lordadmira
28th June 2004, 14:16
Most definately. Ur running it through 7 filters!
kitanai
28th June 2004, 17:09
How true! :D
I encoded the file without "FluxSmooth" and I get 15fps.
However it is definitely "Convolution3d" that slows the whole process down so dramatically.
But my cable signal is a little noisy, so I don't get around it :mad:
lordadmira
28th June 2004, 17:20
Same here but I just use smooth, temporal smooth, and warp sharp and I get dramatically cleaner video. Methinks ur doing a little overkill.
kitanai
28th June 2004, 17:27
Well, I surely accept suggestions:
Please tell me a little more about your filters.
But I know: temporal smooth on its own is not strong enough!
-----------
I just checked with:
Temporalsoften(4,8,8,mode=2,scenechange=10) # heavy noise
and it does the job very well.
Sorry, my overkill ;)
kitanai
28th June 2004, 22:08
As mentioned before, I still try to encode 24 min of anime.
I tried several matrices and the result was always undersized. :mad:
I aimed at 332MB, but the outcome was (incl. 23MB audio!):
CG-Anmination Matrix: 191 MB
hvs-best-picture: 219 MB
h.263: 267 MB
Settings:
B-VOBs:
max c. Bvobs : 2
Quant. ratio : 1.50
Quant. offset: 0.50
Quantization:
all mins : 2
all maxs : 31
no trellis
No GMC
No Quartel Pixel
Do you have some suggestions? :confused:
I searched the forum, and it has been asked quite a few times, but the answers don't make sense to me. And this has never happed before (well those file were always aimed at 700MB...)
thoralf
28th June 2004, 23:16
Originally posted by Koepi
Somewhat industrial. I _hate_ industrial.
Why don't you get yourself headphones? I used to do that while I was translating and proof-reading computergames. Some Aphex Twin or ambient stuff and you're all set :-)
lordadmira
29th June 2004, 00:52
Originally posted by kitanai
As mentioned before, I still try to encode 24 min of anime. I tried several matrices and the result was always undersized. :mad: I aimed at 332MB, but the outcome was (incl. 23MB audio!): Ur ape for overkill aren't ya. 332 MB is too much for a standard anime episode even at DVD resolution. 233 MB with 192 kbps audio will cover 95% of what's out there. But if u really want to suck up more space to make that size target, enable QP, GMC, Trellis, and disable BVOPs. If that's still not enough use the Fox Home Entertainment matrix. :devil:
@thoralf: Whaa???
LA
kitanai
29th June 2004, 07:17
Ok, you are probably right. ;)
I did not know, that anime would compress that good.
This might sound odd now, but where do I get the Fox Matrix? :confused:
And so I don't make the same mistake again:
I have a tape I would like to backup with XviD. It is approx. 1h long, non-anmie movie and it encodes with 680*560.
I can go to a final size of 1450MB since I want to compress with the least amount of quality loss (well, the source is already crappy enough).
Which Matrix do you recommend here?
helix
29th June 2004, 18:46
Found this thread, any opinions about it? seems like they're taking a different approach to some of the options.
http://forums.animesuki.com/printthread.php?t=1685&page=1&pp=20
lordadmira
29th June 2004, 18:57
What a useless thread. :p
LA
helix
30th June 2004, 00:57
Heh, O well. Will I be hurting anything or denying myself anything by trying some of the things they've suggested? I'm still getting a good amount of edge artifacts with my current method, so i'm open to new stuff.
lordadmira
30th June 2004, 10:16
Well from what I read it didn't seem like they really knew what they were talking about. (do we know what we're talking about? :p) Saying stuff like "don't use GMC or Trellis" is stupid. Plus that thread is old, dev-api era.
LA
helix
30th June 2004, 15:23
Yeah I noticed they were talking about v1.0. But I did try a few things that were mentioned like changing the zone values (rate control to qunatizer mode set at 3.05). I've never heard anything about the rate control before so I went ahead with altering it. I also changed some other stuff, and it didn't really look like it changed much quality wise. I'm still looking for a way to get rid of noise and such around the egdes, it looks terrible. It's getting to the point where I can no longer watch fansubbes and see the nice smooth quality and noiceless picture without getting angry at Xvid. There must be a avisynth filter for noice problems like that. Well, i'll keep working at it, it's already been quite a learning experence. And i'd of cource take your advice over thiers :D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.