View Full Version : another anime xvid thread
helix
2nd July 2004, 21:36
Should either packed bitstream or closed GOV be enabled? Don't they have somthing to do with MPEG-4 compatability?
lordadmira
6th July 2004, 18:02
Playing with the zone weights won't do anything for u. Those are only for dealing with "problem areas" or other parts that should have special settings. Like if the standard rate control isn't giving enough bitage to a scene u can set a zone to increase that scene's bit bank account, either by increasing the weight or setting a low fixed quantizer. U can also use it to take away bitage from low importance scenes like credits, bumps, or intros and redistribute it to the rest of the video.
Closed GOV should always be enabled since that is a compatibility issue. It ensures that each GOP ends on a P frame and is self contained. Packed Bitstream should be enabled unless u have an issue with a standalone player. It prevents a "bug" in the VfW interface and also slightly speeds up decoding.
Here's another tip/trick. Use Ogg Vorbis audio and encode into OGM format. Vorbis is a higher quality audio codec than MP3 so u can encode the audio at a lower bitrate with the same quality. 80 kbps Vorbis should give u the same quality as 128 kbps MP3. U can then devote the saved space to the video stream. U can't encode (properly) Vorbis within Virtual Dub so u have to use OggDropXP or equivalent to encode it externally and then add it into the stream list.
LA
RadicalEd
6th July 2004, 22:35
Originally posted by lordadmira
Here's another tip/trick. Use Ogg Vorbis audio and encode into OGM format. Vorbis is a higher quality audio codec than MP3 so u can encode the audio at a lower bitrate with the same quality. 80 kbps Vorbis should give u the same quality as 128 kbps MP3. U can then devote the saved space to the video stream. U can't encode (properly) Vorbis within Virtual Dub so u have to use OggDropXP or equivalent to encode it externally and then add it into the stream list.
Here's an even better trick, use AAC and encode to MP4.
WUH OH FORMAT WARS
helix
7th July 2004, 06:59
So should I have a zone weight of 1.00, or should I just delete the zone all together?
lordadmira
7th July 2004, 14:58
1.0, u need atleast one zone so u can set B frame sensitivity and chroma.
helix
7th July 2004, 19:54
Yeah thats what I though, thanks.
helix
8th July 2004, 06:48
Well, after long last I think I 've fianlly succeded in getting a good quality file. Here are my setting as of now, let me know if theres anything I should change. Further below is the Divx DRF analyzer log to look at. This particular clip was one minute long and had a size of 6.9Mb, I was aiming for 7Mb, so it looks like I can keep it to 175Mb a full episode.
fourCC: DX50
Quantization Type: H.263
Didn't enable AQ
Didn't enable GMC
Max consecutive BVOPs: 2
Quantizer ratio: 1.50
Qualtizer offset: 0.00
Packed bitstream enabled
Closed GOV enabled
Chroma optimizer enabled
BVOP sens: 0
Max I-frame interval: 600
Use chroma motion enabled
MSP: 6-ultra high
VHQ: 4-wide search
Cartoon mode enabled
------------------------------------------------
DivX DRF Analyzer v0.9.5 Report!
File Name: D:\Lodoss ripping project\avs frameserv 2.avi
FourCC: DX50
Codec: XviD0035C
Resolution: [ Width: 640 Height: 480 ]
Frame Rate: 23.976 frames per second
The Video has 1438 frames [ 00:00:59 ]
Average Frame quality is MEDIUM [Average DRF/quantizer is 3.29]
Standard Deviation: Quality is HIGH [Std. Deviation is 0.58]
Image Resolution is HIGH
The file has Packeted Frames!
There are NO frame drops ( NO drops is better )
Recomended Resolution: [576x432] (Target DRF/quantizer=2.8)
Performance Caracteristics:
Macroblocks per frame: 1200 ( Poor Playback in Slow Computers, PIII450 or better required )
The Width is multiple of 32
Kilobits per Second: 801.06
Kilobits per Frame: 32.86
Kilobits per Macroblock: 0.027
Bits per Pixel: 0.11
Frame Type Statistics :
I Frames: 0.90%
P Frames: 65.99%
B Frames: 33.10%
S Frames: 0.00%
N Frames: 0.00%
(More Advanced Codecs use B and S frames)
Frame Quality Statistics :
DRF=1&2: 40 2.8%
DRF=3: 971 68.1%
DRF=4: 369 25.9%
DRF=5: 41 2.9%
DRF=6: 4 0.3%
DRF=7: 0 0.0%
DRF=8: 0 0.0%
DRF=9: 0 0.0%
DRF>9: 0 0.0%
KeyF/DeltaF: 0.91%
KeyDRF<4: 13
KeyDRF=4: 0
KeyDRF>4: 0
AverageKeyDRF: 2.69
MAXDRF: 6
AverageDRF: 3.29
Deviation: 0.58
lordadmira
8th July 2004, 20:02
That's good. Finally getting somewhere. Three things: Why set the FourCC to DX50? Are u planning to distribute this? If so I would change the 4CC afterwards with AVIC. I've had strange things happen when setting the 4CC inside Xvid (playback/sync issues). Maybe some insiders know what's going on with that. U should have GMC turned on unless u want it to work with current stand-alone players. GMC will save some space with the motion vectors. Hopefully in the near future the stand-alones will have full GMC support. Were u seeing extra blockiness with AQ turned on? It's not perfect yet but works reasonably well. I would leave it on unless u see artifacts from it. It'll save space u can use for basic picture quality.
LA
helix
8th July 2004, 21:27
I'm not really sure why i'm using DX50. I used alot of fansubs I had as a "template" for my encode hoping that I could obtain the same level of quality. A sharp clear looking 24 minute fansub at 140Mb seemed pretty impressive. Since I won't be distributing this, I'll just stick with DX50 I guess. I'll also try turning on GMC as well and see if I get a size decrease. AQ did tend to leave a tad more blockiness, so I decided not use it in that particular encode. I might try it with some other shows though to see if it helps any.
Thanks
Caspar
8th July 2004, 23:59
I think you will have a problem with DX50 and BVOPs: 2 with Packed bitstream enabled. The last I checked, the DivX5 decoder have problems decoding more than 1 b-frame with packed bitstream enabled.
I don't think you should enable Cartoon Mode, but that's just me.
lordadmira
9th July 2004, 01:28
If u don't need DX50 4CC for some distro/compatibility reason u should leave it at Xvid. It tells ur system what filter to use to decode the video.
helix
9th July 2004, 04:27
This thing was, it seemed like I was getting better quality when I used DX50 rather than Xvid. It really puzzeled me because when i'd check the fourCC of various fansubs I had, the fourCC would sometimes be Xvid, but still produce a perfect level of quality when played. When I used Xvid with my encode it would look blocky and parts of the picture around lines would shake. DX50 has given me pretty good results that seem to be up to par with fansubs of similar size.
lordadmira
9th July 2004, 05:30
Well all it does is tell ur system what decoder to use. It could be that u were seeing some postprocessing from the Divx filter and not from the Xvid filter. If u go into the media player properties while ur playing the video it'll tell u what Direct Show filter is being used. The new ffDshow filter is better than either of em so I'ld use that. It decodes all MPEG-4 streams. It's not surprising that u'ld be confused, installing lots of codecs can really muck up ur video system.
helix
9th July 2004, 05:39
Yeah, thats one of the reasons why it was so confusing. All the fourCC is suppost to do it specify which codec decodes the file. So why would the quality change on my file when I went from Xvid to DX50 and fansubs look the same regardless of what they have - Xvid, DX50 and Divx? Anyway, here is what is listed under the filters menu in BSplayer. I'm not sure if it's using the red or the black, (i'm assuming the red) so here is a screen shot. This is while playing my one minute encode with DX50. I do by the way have a ton of codecs installed on my computer.
http://www.clanbbw.com/publicimg/data/images/filters.jpg
lordadmira
9th July 2004, 06:12
Well like I said, the only reason they would (should) look different is the postprocessing settings in one filter vs. another. That screen shot indicates that Xvid is the filter in use. So even though u set DX50, XVid is handling that 4CC. :D Another thing u could be experiencing is a possible bug in setting the 4CC inside of Xvid. I've seen strangeness because of that. ffDshow is the best decoder right now I think.
helix
9th July 2004, 06:19
So should I uninstall Direct show and install FFDshow? Thought I had it installed already... O well. Once I do, I'll try using an Xvid fourCC and see if I get better looking video.
lordadmira
9th July 2004, 06:26
No :p ffDshow is a Direct Show video rendering filter. Like Xvid and Divx. Direct Show is the Microsoft video acceleration API.
helix
9th July 2004, 06:41
Oh... Didn't know they were the same thing. :D So, what should I do regarding fourCCs? I'm at a dead end :confused:
lordadmira
9th July 2004, 06:51
Just set it to Xvid and forget about it.
lamer_de
9th July 2004, 07:08
Fansubs used DX50 as fourcc for a long time (or are still using it) because people were too computer illiterate to install xvid or ffdshow, so that they could play it back with divx. So yes, only compatibility reasons. If you uncheck packed bistream you can use more than 1 bframe with dx50, which is reccomended, as packed bistream seems to be only causing problems for many people. But setting the fourcc to XVID ain't no bad either,after all, it's XVID and not DX50 ;)
CU,
lamer_de
helix
9th July 2004, 07:33
So I really wouldn't be "hurting" anything by using DX50, but it makes more sence to use Xvid if i'm keeping this file for myself and not distributing it. Right?
lamer_de
9th July 2004, 12:21
In my opinion, yes.
Sirber
9th July 2004, 12:29
I'm recompressing all my anime to RV10 in order to cut filesize by half or more with no significant quality loss, since I don't redistribute.
Note: Sorry to talk about realvideo in xvid thread!!! :(
Soulhunter
10th July 2004, 03:37
Originally posted by Sirber
Note: Sorry to talk about realvideo in xvid thread!!! :(
Think in your case its some sort of common law... :D
Bye
helix
10th July 2004, 06:58
Just a few questions. If I need to turn up the warpsharp which takes away alot of the detail, would it be better if I used MPEG insted of H.263? I'v heard it can help in situations like that. Another thing is that the camera pans look a tad jerky, any way to decrease that?
Note: i'm going on a damn vacation for a week, so i'll have to wait till I get back to experiment. :(
MasterYoshidino
10th July 2004, 07:45
how about a line darkening warpsharp?warpsharp(depth=50,blur=2,bump=100,cubic=-0.5)
mpeg won't make a difference in pans, thats quantization difference. using mpeg would mean less potential macroblocks in pans due to reduced compression. even better would be custom quantization and all intra be at 8 and all inter be at 16.
knight_inferno
12th July 2004, 06:04
Originally posted by helix
Well, after long last I think I 've fianlly succeded in getting a good quality file. Here are my setting as of now, let me know if theres anything I should change. Further below is the Divx DRF analyzer log to look at. This particular clip was one minute long and had a size of 6.9Mb, I was aiming for 7Mb, so it looks like I can keep it to 175Mb a full episode.
fourCC: DX50
Quantization Type: H.263
Didn't enable AQ
Didn't enable GMC
Max consecutive BVOPs: 2
Quantizer ratio: 1.50
Qualtizer offset: 0.00
Packed bitstream enabled
Closed GOV enabled
Chroma optimizer enabled
BVOP sens: 0
Max I-frame interval: 600
Use chroma motion enabled
MSP: 6-ultra high
VHQ: 4-wide search
Cartoon mode enabled
Heyas :)
Just wondering Helix, did you end up using Trellis Quantization?
I am currently encoding Gokudo (Yes it's anime) with the settings above, I don't know the end result yet :)
My AVS looks like
==================
mpeg2source("D:\01\01.d2v")
crop(14,2,692,476)
Telecide(order=1,guide=1).Decimate()
Undot()
Convolution3d("AnimeLQ")
Temporalsoften(4,4,8,mode=2,scenechange=8)
VagueDenoiser(threshold=4,method=1,nsteps=6,chroma=true,debug=false)
LanczosResize(640,480)
awarpsharp()
====================
Anyone want to pick at it? :)
helix
17th July 2004, 20:50
Yeah, I think I used Trellis Quantization.
Teegedeck
17th July 2004, 22:07
Don't use packed bitstream; it doesn't work well if you use more than 1 b-frame.
kitanai
19th July 2004, 09:46
Somewhere on my way through the Doom9 forum, I read about this phenomenon, but I cannot find it anymore :(
My anime encodings show the following blocks in almost every scene:
http://www.nt-internet.de/doom9/noir_01.jpg -> http://www.nt-internet.de/doom9/noir_02.jpg
The clip is 560x336 (I know it's not mod 32, but always worked fine before), H.263 Matrix, Cartoon flag.
Avisynth:
------------------------------------------------------------
avisource("E:\noir_src.avi", pixel_type="YUY2")
Trim(775,25181) ++ Trim(31323,43170)
crop(14,84,696,416)
FieldDeinterlace()
Temporalsoften(4,8,8,mode=2,scenechange=10) # heavy noise
LanczosResize(560,336)
Levels(0, 1.1, 255, 0, 255)
Undot()
------------------------------------------------------------
Leak
19th July 2004, 22:01
Originally posted by kitanai
The clip is 560x336 (I know it's not mod 32, but always worked fine before), H.263 Matrix, Cartoon flag.
Well, have you tried encoding a short clip without cartoon mode for comparison?
Are you using B-frames, by the way? And which version of XviD did you use?
np: Amorphous Androgynous - Rural Green (The Otherness)
helix
19th July 2004, 22:24
I wanted to ask, does using cartoon mode for older anime make a differnce in the final encode as opposed to a newer anime with CG and the like? I'm starting to think the reason why i'm getting such poor results with Xvid and lodoss is becuase of the nature of the video itself. Lodoss has pretty flat colors with little shading and CG, so i'm not sure if thats some kind of factor in getting bad quality. I though cartoon mode might be optimized for "newer" looking anime or cartoons.
Leak
20th July 2004, 00:28
Originally posted by helix
Lodoss has pretty flat colors with little shading and CG, so i'm not sure if thats some kind of factor in getting bad quality. I though cartoon mode might be optimized for "newer" looking anime or cartoons.
Well, actually cartoon mode is meant for old cartoons (and probably also stuff like the Simpsons) that have little to no gradients and well-defined high contrast boundaries...
np: Radiohead - Skttrbrain (Four Tet Remix) (Com Lag (2+2=5))
lordadmira
20th July 2004, 01:21
Speaking of Cartoon Mode, I've just encountered another artifact situation from using it. And this was on good old flat primitive 2D animation. The camera was following a bus driving down the road with trees going by. Where the black lines from the trees passed by left a trail of blackish artifacts in the green of the trees. It disappeared when I turned off Cartoon Mode. So I'm thinking that the threshold change is too strong.
LA
PS, What Cartoon Mode actually does is raise the threshold whereby the codec senses "motion". It's meant to keep noise and grain from triggering motion detection. Theoretically this will result in better looking video since the block can be carried forward without having any/as much texture applied to it. But if this happens when it shouldn't have, u get an artifact.
kitanai
20th July 2004, 07:33
I use XviD 1.0.1 from Doom9 and yes, with B-frames.
Interesting: I recall encoding the first two episodes with XviD 1.0 and the last two (which show these blocks) with XviD 1.0.1. All with the same settings and Cartoon Mode.
helix
20th July 2004, 09:09
Does using Trellis make that much of a differnce, in my case I don't think it really does anything at all. I compared the DRF/quantization average of two clips, one with Trellis and one without, and they were practically the same. :confused:
lordadmira
20th July 2004, 10:58
Trellis is one of those "incremental" quality improvements. Add up enough nickels and u'll get a dollar.
LA
haibane
21st July 2004, 19:32
Originally posted by kitanai
Somewhere on my way through the Doom9 forum, I read about this phenomenon, but I cannot find it anymore :(
My anime encodings show the following blocks in almost every scene:
http://www.nt-internet.de/doom9/noir_01.jpg -> http://www.nt-internet.de/doom9/noir_02.jpg
The clip is 560x336 (I know it's not mod 32, but always worked fine before), H.263 Matrix, Cartoon flag.
Avisynth:
------------------------------------------------------------
avisource("E:\noir_src.avi", pixel_type="YUY2")
Trim(775,25181) ++ Trim(31323,43170)
crop(14,84,696,416)
FieldDeinterlace()
Temporalsoften(4,8,8,mode=2,scenechange=10) # heavy noise
LanczosResize(560,336)
Levels(0, 1.1, 255, 0, 255)
Undot()
------------------------------------------------------------
I use to have similar problem like this, I found the cause to be the divx postprocessing filter, it seems force it to decode with xvid(change fourcc) would solve the problem for me.
It could be other reason or just the classic invert luma block thing from ages ago.
helix
22nd July 2004, 06:12
Well, I can't seem to get rid of all the block noise, my video is still looking pretty crummy. I've been playing around with B-frames, but still with no sucess, I just can't seem to get a smooth picture. I also can't get below a 3.7 quantization/DRF average. the only option I can see at this point is to increase the file size. Is there anything elts I can do?
lordadmira
23rd July 2004, 01:28
What I would probably do in this situation is crank up the preprocessing. Meaning smart smoother and temporal cleaner. Crank it up ridiculously high and see how it looks. Once I was convinced there was nothing more to gain from that I would reduce the resolution. 175MB per episode is just a stressful thing for the codec at full rez. Try some 233 MB encodes to see how they look, u might me convinced.
LA
helix
23rd July 2004, 02:40
I'm probally going to want to disable B-frames if i'm going to 233Mb right?
kitanai
23rd July 2004, 08:11
Originally posted by haibane
I use to have similar problem like this, I found the cause to be the divx postprocessing filter, it seems force it to decode with xvid(change fourcc) would solve the problem for me.
You are so right! I disabled the DivX 5 MPEP4-support and the avis play fine. (I use DivX to decode because I am still waiting for the brightness slider to reappear in XviD ;) )
Teegedeck
23rd July 2004, 08:15
Originally posted by helix
I'm probally going to want to disable B-frames if i'm going to 233Mb right?
Why would you want to do that? You were trying to bring the average p-frame quantizer down, weren't you?
BTW, I don't know DRF-analyzer. Are you sure the 3.7 average quant you get aren't weighing b-frame quantizers, too?
helix
23rd July 2004, 08:29
Yeah, i'm almost positive it looks at them too, the b-frame quantizers that is. I was wondering whether or not to disable b-frames becuase I though that b-frames improved compression but degraded quality. So by raising the file size I was "ignoring" compression and could then disable b-frames and get that much bigger of a quality boost. But I guess now i'll trying using them and see if I can't get the DRF average lower. I tried 233mb and was getting a DRF average of 3.4, so not a big change.
unmei
23rd July 2004, 09:14
If this average Quant from DRF-Analyzer includes B-frames (what i think, else it wouldnt make much sense) it is not surprising you seemingly cant get it any lower at least if you use default / close to default B-frame settings. It is at lowest Q2 for P and Q4 for B, and with anime you have lots of b-frames often even 2 consecutive. This gives you 50-67% B-frames with 50% the lowest you can get is Quant 3, the same as in the first pass, with 67% it is even at least 3.3.
But what scares you about that? I always thought anime encoding people are funny (no offense!) i encode almost exclusively anime but most of the time i have average quantisers ranging from 3.5 to 6(!) Now i wouldn't dare to say these are top encodes, but they are very watchable and imo still not inferior to *cough* AX *cough* or *cough* a4e *cough* and similar encodes. After all it is a matter of taste, and i DO prefer a block you notice in freeze-frame but not in motion over a overfiltered but block-free encode (else i would also be using Real-Video or VP6 and not Xvid). Finally i encode PAL DVD episodes unresized to 170mb and i don't think this is so stressful for the encoder ..great expression lordadmira btw :).
Teegedeck
23rd July 2004, 10:51
My thoughts exactly. :)
lordadmira
23rd July 2004, 12:28
Originally posted by helix
I was wondering whether or not to disable b-frames becuase I though that b-frames improved compression but degraded quality. So by raising the file size I was "ignoring" compression and could then disable b-frames and get that much bigger of a quality boost. Sort of. By going to 233 MB u can now "afford" to use all P frames. IMHO no BVOPs will always look better than with BVOPs when u have enough breathing room. When I encode an Inuyasha ep at 233 MB and 192 kbps audio the quantizer usually comes out to about 3. Some 2's some 4's but vastly mostly 3's. Honestly I think they look even better without BVOPs than they ever did with BVOPs. Think of B frames as "decreasing the quality drop" from higher compression, not "increasing quality". For the DRF thing, I think u need to consider average P quants and average B quants seperately since they are so different.
LA
helix
23rd July 2004, 23:40
Originally posted by unmei
But what scares you about that? I always thought anime encoding people are funny (no offense!) i encode almost exclusively anime but most of the time i have average quantisers ranging from 3.5 to 6(!) Now i wouldn't dare to say these are top encodes, but they are very watchable and imo still not inferior to *cough* AX *cough* or *cough* a4e *cough* and similar encodes. After all it is a matter of taste, and i DO prefer a block you notice in freeze-frame but not in motion over a overfiltered but block-free encode (else i would also be using Real-Video or VP6 and not Xvid). Finally i encode PAL DVD episodes unresized to 170mb and i don't think this is so stressful for the encoder ..great expression lordadmira btw :).
The thing that eventually annoys me into trying to get around a 3 quantizer encode is alot of the fansubs I have, like I said before. I just can't seem to figure out how they get these 160Mb files with quantizers of 3.2 and still get excellent picture quality without vitually any block noise. It's mind numbing to think of how they do it. Plus, i'm comming from a DVD source, granted not one with supurb quality, but still a DVD source. Block noise for me is seeming to be one of the hardest things to eliminate from my encodes, I was almost sure that at 175Mb and 640x480 that I could get a pretty smooth looking video file. I wish I could talk to someone who's done lodoss into Xvid before so I could see if thier getting they same results as I am, and what I can do to make it better. Well, I guess i'll just keep playing around with BVOPs and prefiltering and hope I get a good looking file with a decent quantizer average. Thanks for the recent comments though :) .
lordadmira
25th July 2004, 11:38
My bet is that they're using strong filtering and crystal clean sources. Anime can be filtered to extremes and still look good. U can't do that with live stuff.
unmei
25th July 2004, 13:27
Yes fansubs, at least most, are something completely different since they are made from noisy TV captures. Of course there is a lot of filtering involved there, probably no way around that - but still there are those that look more overfiltered than others :)
If the sources were crystal clear, no filtering at all were necessary..
Some 2's some 4's but vastly mostly 3's
I'm pretty convinced a vanilla encode with P-Quant ~2 and B-Quant ~4 would look better in my eyes. And this is what you would get with B-frames (when a P-only turns out to be ~3).
Alone by the simple fact that the vanilla one would have all frames referring Quant 2 P-frames, while the P-only one would have P-frames referring Quant 3 P-frames.
Actually the vanilla encode were almost certainly 'undersized', but that's not my point.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.