View Full Version : Fast Motion Anime
Jedd
20th August 2003, 03:18
Don't know if this topic really belongs to XviD or AviSynth forum, but I'll try it here.
I'm doing "Slayers Try" episodes, the dvd source is a little noisy, but acceptable.
Filters are: mfToon() and Deen("a3d",3,10,12,20)
XviD set to: 2 pass, Ultra Hight, H.263, Wide Search, I-frames 300:1,
Quarterpel, Chroma Motion, Max B-frames:2, ratio 150, offset: 75, treshold: 100, DX50 on, Quantizer: 2,6,2,16, I-frame boost: 100%, Chroma Optimizer: on
Giving 200Mb for episode I'm getting ~1200kbps out of it.
Overall it looks good, a little blocky here and there, little warps around edges, but not too bad.
The problem starts when it comes to fast motion scenes, when the every next frame is different from the previuos one.
Look how fugly it can be:
http://webpages.charter.net/jedd/garry1.png
http://webpages.charter.net/jedd/garry2.png
:angry:
Anything can be done here?
Edit: treshold : 0 gives much better result, but still far from good...
alucard83
20th August 2003, 07:06
Ehh, one thing you can try is decreasing the I-frame boost% or using a customized matrix. But, one clear way to get rid of that is too increase the filesize which in turn increases the bitrate
Animaniac
20th August 2003, 08:47
Which build of XviD are you using?
mf
20th August 2003, 11:38
Can you show me a "normal" frame? I wanna know how mfToon looks on Slayers Try as I've never Tried (okok, lame pun) :D :D.
gpower2
20th August 2003, 11:55
@Jedd
Well, I find it really weird to see such messy frames@1200kbps. Try downloading Nic's latest binary if you have Intel CPU, or Koepi's binary for AMD, and disable Qpel, and use quantizers 2,6,2,6. All the other settings seem fine to me! I don't believe that this might be because of the filters, but you should try it too, I mean disable these filters for noise, or use something else, wavelet noise reduction seems fine to me, especially for animes!
CU
Jedd
20th August 2003, 15:18
decreasing the I-frame boost% or using a customized matrix
I'll try to pace the boost, but changing the matrix right now is beyond of my knowledge. ;)
disable Qpel, and use quantizers 2,6,2,6
I'll try that too, thanks.
increase the filesize
I'd like to do it in effective way, rather then in extensive. And 1200kbps is already too much, I think.
Which build of XviD are you using?
XviD Koepi 24062003-1 (or whatever is on software download page)
Can you show me a "normal" frame?
I think I already did:
source (http://webpages.charter.net/jedd/ORIG.png)
mfToon (http://webpages.charter.net/jedd/MF.png)
After tooning it looks much better then a source, now the only problem is to encode it right. :cool:
Teegedeck
20th August 2003, 16:21
I don't see an I-frame bitrate reduction in your settings. If you use a boost of 100%, you also gotta use a reduction of 50%; otherwise you're spending way too many bits on I-frames and consequently too little on P- and B-frames. Maybe you just forgot to list the boost in your post.
Angrychair
20th August 2003, 18:20
Originally posted by Jedd
Don't know if this topic really belongs to XviD or AviSynth forum, but I'll try it here.
I'm doing "Slayers Try" episodes, the dvd source is a little noisy, but acceptable.
Filters are: mfToon() and Deen("a3d",3,10,12,20)
XviD set to: 2 pass, Ultra Hight, H.263, Wide Search, I-frames 300:1,
Quarterpel, Chroma Motion, Max B-frames:2, ratio 150, offset: 75, treshold: 100, DX50 on, Quantizer: 2,6,2,16, I-frame boost: 100%, Chroma Optimizer: on
Giving 200Mb for episode I'm getting ~1200kbps out of it.
Overall it looks good, a little blocky here and there, little warps around edges, but not too bad.
The problem starts when it comes to fast motion scenes, when the every next frame is different from the previuos one.
Look how fugly it can be:
http://webpages.charter.net/jedd/garry1.png
http://webpages.charter.net/jedd/garry2.png
:angry:
Anything can be done here?
Edit: treshold : 0 gives much better result, but still far from good...
A few things. First off, it's obvious you're not using R1 or R2 dvd raws as a source for those screenshots (don't bother arguing, I'm not judging you, just stating you're not using a good source) as such you're probably getting most of those artifacts from the source, not xvid. (note the partial blending of frames) Some heavy (VERY HEAVY) filtering might blur those down into more of a soup, but that wouldn't exactly increase quality all around.
Secondly, you should probably go ahead and use vhq. I use it on every encode, and it has never hurt my results.
If you're really crazy about quality and have weeks to spend on this, go ahead and go frame by frame through the raw in tmpeg and try to pick only the best frames for encoding (ones that aren't a partial blend of two different frames). However, with the amount of time it takes to do that on a raw of that low quality, I wouldn't bother.
The upshot: Increase bitrate, or find a better source, preferrably the latter. Also remember to enable vhq.
EDIT: Oh yeah, also forgot to tell you to stop manually limiting your quantizers, people that tell you to do this are leading you astray. Plus that huge I-frame increase isn't a great idea. Tone it down some.
alucard83
20th August 2003, 19:11
Jedd, there's a thread on this forum that has a bunch of customized matrices for dl;)
Jedd
21st August 2003, 01:17
Originally posted by Teegedeck
I don't see an I-frame bitrate reduction in your settings. If you use a boost of 100%, you also gotta use a reduction of 50%; otherwise you're spending way too many bits on I-frames and consequently too little on P- and B-frames. Maybe you just forgot to list the boost in your post.
Yeah, I use 50% reduction. Just forgot to post it.
If I start to decrease boost how should I change distance and reduction?
ChronoReverse
21st August 2003, 02:36
Just out of interest, have you tried hitting "Load Defaults" and then using just simple profile features along with VHQ?
Also, these mixed frames aren't in the source right? I mean you went and checked right?
And try using bframes 1/150/100/100. Frankly I don't see why you need any higher.
And as for quantization capping. This isn't actually a bad thing to do, but sometimes you may want to not use it. I have noticed that XviD tends to choose too high of a quantization for high motion animation tho. Try a cap of 2/8/2/14 (more conservative).
Don't use qpel, it can bring benefits, but it's just too flaky (as in you can't be too sure it'll bring a benefit without actually trying it out).
Frankly, the defaults for I-frame boost and etc ought to be fine for Slayers Try. It's not really _that_ bad to compress.
You may also want to try Payback with Bias.
I have a feeling that it's not the I-frames that are ugly but the P/B-frames. Can you check?
Jedd
21st August 2003, 04:46
The source is ok, not a very good one, but ok.
Defaults + VHQ looks like shit everywhere. :devil:
1/150/100/100 + a cap of 2/8/2/14 looks better, but somehow produces the file twice the size I have asked for.
How do I check P/B frames?
Right now I'm going to run VHQ 1, qpel, chroma, B:2/133/100/0, Q:2/6/2/6, I:100/24/50. With the the short clip it gives excelent results, but tripples the size. Lets see how it will look with the full movie.
unmei
21st August 2003, 10:39
i just wonder have you tried without capping the quants ?
i do some other things differently than you, but this is set that really jumped to my eyes.
I dont want to argue about it - i think it's a "different religion than mine" :D - but i never cap quants and although my encodes might not be the best possible quality i still have never experienced such extreme blocking on bitrates around 1200 kbit/s, and i did some stuff that has detailed hi motion (Sakura Wars, MKR, Legend of Basara are the ones now jumping to my mind :).
mf
21st August 2003, 12:39
Originally posted by Jedd
I think I already did:
source (http://webpages.charter.net/jedd/ORIG.png)
mfToon (http://webpages.charter.net/jedd/MF.png)
After tooning it looks much better then a source, now the only problem is to encode it right. :cool:
Oh yeah right, sorry for asking. I forgot ;).
koszopal
21st August 2003, 13:57
@jedd
source seems to be bad and after mftoon its better but i think its more blockly :D ,im just curiuous that could u encode and check quality an fast scenes w/o mftoon filter ?
Jedd
22nd August 2003, 01:02
Here we come, maybe cap is an evil thing, but take a moment and look:
Garry, mfTooned frame before compression (http://webpages.charter.net/jedd/garry0.png)
Garry, no cap (http://webpages.charter.net/jedd/garry_nocap.png)
Garry - cap (2,6,2,6) (http://webpages.charter.net/jedd/garry_cap.png)
All other settings were: VHQ 1, qpel, chroma, B:2/133/100/0, I:100/24/50, chroma-opt.
I don't know if it's gonna hurt me somwhere else, but I'm going to keep that cap. :eek:
K_R
22nd August 2003, 07:35
People that say not to cap quants for anime either don't really understand anime encoding or can encode at QB100.
Capping the q will prevents the horrible blockiness that you were getting before and raise the average q. If you run it through a q analyser you'll find most of your frames in the 3 or 4 bracket and have a lower standard deviation. Which is a lot better than leaving it uncapped and having q=2 for static frames and q=20 for high motion (and everything else in between).
I use two-pass i:0/6/12 for ntsc source.
And you should try vhq=4.
gpower2
22nd August 2003, 11:35
@Jedd
I'm glad you tried to reduce the max quantizers! I know it does indeed increase filesize, but you get the quality you want! I totally disagree with all those who say not to cap the quantizers! I discovered this when I was encoding with DivX 4 and ever since I always tamper with them! One good reason I abandonned DivX is that from version 5.0.3 you couldn;t mess with the quantizers!
Try using VHQ=4 and no Qpel because it is still experimental and doesn't always works fine. Just a thought!
CU
mf
22nd August 2003, 11:41
@Jedd
You are hearing cheers from capping people all over, but they cap quants as a standard thing. Keep doing as you do now, only cap quants if entirely necessary, and avoid it in all other cases. This is the philosophy of (most of? I think all) the xvid developers and the core testers. This is all I'll say for now, before the happy cappers bash me down again on their theories.
gpower2
22nd August 2003, 12:02
@mf
Name one good reason why we shouldn't cap the quantizers. If it is about size, then you are wrong! I have encoded more than 70 DVD movies and more than 50 TV captures with capped quantizers and I got the BEST result I could get! When I tried without the capped quantizers, everything looked ok at first, until a really really fast scene appeared and suddenly, blocks everywhere! Also, at scenes with a lot of particles which require a lot of keyframes, sparkles looked like yellow squares!
@XviD-DivX-Mpeg4 Developers
We have a good debate here for once more, about limiting quantizers. What do you believe? If you really don't believe it is necessary, why do you leave the quantizers "open to the public", free to alter them as we wish? Just an opinion guys...
CU
Jedd
22nd August 2003, 15:20
Originally posted by K_R
I use two-pass i:0/6/12 for ntsc source.
And you should try vhq=4.
So, should I try
VHQ 4, qpel, chroma, B:2/133/100/0, Q:2/6/2/6, I:0/6/12, chroma-opt ?
(I have tried qpel on and off, couldn't find any difference)
unmei
22nd August 2003, 18:17
oki, first i made a little mistake: i mentioned MKR as as example, but i found i used divx 5.0.3 back then, so i will not include it in the following screencaps :)
I looked two encodes i made (El-Hazard Ep 16 and Legend of Basara Ep 12).The first is very demanding because there is a hurricane and tons of fast moving scenes and clothes moving in the wind. The second has extraordinary art that would be "plastified" if i applied the commonly used anime pre-filters (it has only mpegdec pp=6, tomsmocomp, a _very_tiny_ amount of mipsmooth and undot, El-H uses stronger mipsmooth plus aWarpsharp).
El-H has a max quantiser of 9. LoB's max quantiser is 12 which occurs in a B-frame in a completely still scene, in hi motion scenes the quant never exceeds 6. This is _not_ capped, but the codec will not use too high quantisers if you dont bork the settings :D
The size is made to fit 3 Eps on 700mb, settings are:
h.263, VHQ 4, Qpel, CM + Copt, trellis R-D, B: 2/150/75/0, everything else on default.
now some pix - none of them is a keyframe, most are B-frames :
El-Hazard
1 (http://loggia.zzcom.net/naminerd/blah/himotionQ-ElH-1.png) 2 (http://loggia.zzcom.net/naminerd/blah/himotionQ-ElH-2.png) 3 (http://loggia.zzcom.net/naminerd/blah/himotionQ-ElH-3.png) 4 (http://loggia.zzcom.net/naminerd/blah/himotionQ-ElH-4.png) 5 (http://loggia.zzcom.net/naminerd/blah/himotionQ-ElH-5.png)
Legend of Basara
1 (http://loggia.zzcom.net/naminerd/blah/himotionQ-LoB-1.png) 2 (http://loggia.zzcom.net/naminerd/blah/himotionQ-LoB-2.png) 3 (http://loggia.zzcom.net/naminerd/blah/himotionQ-LoB-3.png) 4 (http://loggia.zzcom.net/naminerd/blah/himotionQ-LoB-4.png)
(note: the pix are 400-600 kb each, so dont click if you're concerned about bandwidth :)
please wait for the pic to load completely before judging, they are interlaced png and will look blocky in the beginning :p
a lot of cheese to illustrate one thing: the codec is intelligent enough not to raise the quant too high ;D
Joe Fenton
23rd August 2003, 00:17
Think about it logically - when there is low-motion, you get lots of B and P frames. When there is high-motion, you get lots of I frames unless you cap them using the Minimum I-frame interval.
I set the Minimum I-frame interval to 1, the min/max I-Frame quantizers to 2/8, and the Max bitrate to 4000. This makes high-motion sections look awesome.
I set the B-Frames to 2/150/75, the Maximum I-Frame interval to 300, and the P-Frame quantizers to 2/31 for good compression of low-motion sections.
As per xvid coder suggestions, I use I-Frame boost of 0%, Below I-Frame distance of 1/2 the FPS, I-Frame bitrate reduction % equal to the FPS, curve compression set to 0%, 0%, and Bitrate payback delay = 10 x FPS. Since my encodes are usually > 900 kbps, I set Payback with bias.
I use these setting on Cowboy Bebop at about 1100 kbps. I get the exact file size I'm shooting for within 10 KBytes every time. High-motion scenes like explosions and quick cuts and fight sequences (you all know how those go in CB) all look great.
Jedd
24th August 2003, 04:57
As per xvid coder suggestions, I use I-Frame boost of 0%, Below I-Frame distance of 1/2 the FPS, I-Frame bitrate reduction % equal to the FPS, curve compression set to 0%, 0%, and Bitrate payback delay = 10 x FPS. Since my encodes are usually > 900 kbps, I set Payback with bias.
Can someone please explain how FPS value is related to the distance, delay and bitrate reduction? :stupid:
And if I'm teleciding from 30 to 24 which one should I use?
Teegedeck
24th August 2003, 21:08
I would like to know that, too... ;)
...at least for the fps-equals-bitrate-reduction-part.
...especially since there's no boost in the first place; so why reduce anything?
Joe Fenton
25th August 2003, 02:48
Originally posted by Jedd
Can someone please explain how FPS value is related to the distance, delay and bitrate reduction? :stupid:
And if I'm teleciding from 30 to 24 which one should I use?
I can't say why, but it seems to work pretty good. Use the final encoded FPS, not the source FPS. So if you are doing telecine on 30 FPS source, you would use 24, not 30.
If I had to guess, I'd say the programmers maybe wrote things to expect a one second range/interval. So if you are using 24 FPS, a one second delay would be the FPS, or 24. Makes sense - probably completely wrong, but makes sense.
Joe Fenton
25th August 2003, 02:53
Originally posted by Teegedeck
I would like to know that, too... ;)
...at least for the fps-equals-bitrate-reduction-part.
...especially since there's no boost in the first place; so why reduce anything?
Reducing something by a percentage equal to the frame rate sort of makes sense if you think about it like this - the higher the frame rate, the more bits will be consumed by I-Frames. So make the reduction equal to the frame rate so that the higher the rate, the fewer bits get allocated to the I-frames so they don't consume as much of the pool. Kind of evens things out.
Teegedeck
25th August 2003, 04:57
This logic seems a bit peculiar. When you think about it it doesn't really make sense. You could as well say 'the higher the framerate, the more bits will be consumed by P-Frames'. Or 'the brighter the movie, the more bits etc'. Or 'the bigger the resolution; the longer the movie etc.'. You get the general idea, the relation to framerate doesn't make much sense.
Apart from that the codec can decide how many bits to use on what kind of frame-type pretty well all by itself. When XviD decides to use an I-frame, this means that a P-frame in the same place would be bigger. It's counterproductive to 'punish' the codec for using I-frames in places where they should be. Just let XviD do its job.
The i-frame bitrate reduction is only there to reduce i-frames that fall under the 'below i-frame-distance' back to 100% size if you boosted i-frames to something above 100% (which is a good idea, but not for consecutive i-frames - thus the whole 'reduction'-idea).
Joe Fenton
25th August 2003, 20:44
What I meant was, say that you are in a hi-motion area where you are going to get lots of consecutive I-frames. They are then occuring at the frame rate, much like MotionJPEG at this point (in fact, I've seen a MotionJPEG converter that simply recodes the stream from MotionJPEG to a simple MPEG I-frame only stream). The higher the frame rate, the more bits are being used from the bitpool by these consecutive I-frames, so reduce them at a percentage proportional to the frame rate to even out the bit usage by these consecutive sections.
0% boost means you just have it set to a max of 100%. Reducing would then pull it under 100% by a certain amount so it drops to like 90% for example.
Teegedeck
25th August 2003, 22:25
If using the configs this way fits with your personal method of encoding, I'll be the last to say something against it; just keep in mind that there's nothing inherently bad in consecutive I-frames. :)
Jedd
26th August 2003, 01:46
Meantime I have run encodes:
Q:2/6/2/6, I:0/6/12 - bad everywhere, +14 Mb (of 200Mb)
Q:2/6/2/31, I:0/12/24 - High motion still very blocky, +5 Mb
Q:2/6/2/6, I:0/12/24 - on high-motion the best of 'em all, so far, +8Mb
Joe Fenton
26th August 2003, 03:20
Originally posted by Teegedeck
If using the configs this way fits with your personal method of encoding, I'll be the last to say something against it; just keep in mind that there's nothing inherently bad in consecutive I-frames. :)
I agree. It's the consecutive I-frames that give higher quality. It just consumes space, so you get a trade-off. It's a matter of juggling the settings and deciding how much space vs. quality you are willing to sacrifice.
A good example, the ATI video capture uses I-frame only as its "high quality" setting. Of course, the amount of video you can capture in that mode is considerably less than if you allow it to use P or B frames.
Joe Fenton
26th August 2003, 03:26
Originally posted by Jedd
Meantime I have run encodes:
Q:2/6/2/6, I:0/6/12 - bad everywhere, +14 Mb (of 200Mb)
Q:2/6/2/31, I:0/12/24 - High motion still very blocky, +5 Mb
Q:2/6/2/6, I:0/12/24 - on high-motion the best of 'em all, so far, +8Mb
What is the Max bitrate on this? Remember that just making it use lower quantizers won't help the quality too much if it can't get the momentary bitrate up. I use a Max bitrate of 4000 for most things. An exagerated example would be - if the bitrate is 1000 and the max bitrate is 1000, you aren't going to really see any boost at all. You might as well just be doing CBR.
Jedd
26th August 2003, 06:11
Originally posted by Joe Fenton
What is the Max bitrate on this? Remember that just making it use lower quantizers won't help the quality too much if it can't get the momentary bitrate up. I use a Max bitrate of 4000 for most things. An exagerated example would be - if the bitrate is 1000 and the max bitrate is 1000, you aren't going to really see any boost at all. You might as well just be doing CBR.
Max is 4000, but I don't think it went any higher then 1700.
Yeah, and I just did Q:2/6/2/6, I:100/24/50 (+15 Mb) again, and this one looks even better then I:0/12/24
Phew, I feel exhausted. :D
Joe Fenton
26th August 2003, 20:07
Originally posted by Jedd
Max is 4000, but I don't think it went any higher then 1700.
Yeah, and I just did Q:2/6/2/6, I:100/24/50 (+15 Mb) again, and this one looks even better then I:0/12/24
Phew, I feel exhausted. :D
Thanks, I'll have to try it myself. I think that sometimes no one has a real idea of what really makes things look better. You just get enough people to try all the settings and you eventually stumble onto something that looks the best so far. :)
Pen-Pen
30th August 2003, 06:52
Originally posted by Angrychair
A few things. First off, it's obvious you're not using R1 or R2 dvd raws as a source for those screenshots (don't bother arguing, I'm not judging you, just stating you're not using a good source) as such you're probably getting most of those artifacts from the source, not xvid. (note the partial blending of frames) Some heavy (VERY HEAVY) filtering might blur those down into more of a soup, but that wouldn't exactly increase quality all around.
R1, R2, R3, R4, R5, R6 or R7... it won't change his macroblocks problem... (imho)
my piece of advice (though it's quite simplistic) : 1-Pass Q2 :D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.