Log in

View Full Version : meaning of first pass size


junglemike
13th June 2003, 06:16
Hi everyone.
I am trying to understand influence of first pass size to compressibility.Sorry for my basic questions - i'm pretty newbie here.
I am trying to compress captured material to Xvid and experiencing some quelity problems. Unlike DVD rips, my captured files are very hard to compress - even with bitrabes like 1100-1300 quality is not as good as i compress dvd with 800-900.
Here are my settings: I am using bt848 card and capturing video in 768x576 pal using mjpeg or huffyuv codec. The source is pretty noisy since i have regular cable(not digital)
Xvid(14052003) settings: motions search=6,vhq=4,qpel,chroma,bframes=3/150/100/0,chroma optimizer,all other=default.
So i'm testing some filters and their settings to find out hot to encrease compressiibitlity. And i would appreciate your opinion very much. I apply smart deinterlace filter, some slight denoise filters.
The dilemma is which resize filter to uze? I read some info about different resize methods here on this forum but i still want to try them all and see how they work with my particular source. My dest. resolution is 448x336. I'm doing this way: apply all the filters that i need,and make first pass(only first pass). So each first pass for each resize methods. The file sizes of these passes differ from each other. So if i understand it correctly smaller file size means more compressibility? And final second pass will look better?(with the same settings as first pass)? In general, Does the first pass mean that Xvid is trying to sompress with maximum quality? I will appreciate if anyone will explain these things to me.
Another question about speed: I personaly think that quality is much more important than speed, but , anyway, for some reason speed is really slow, i was wondering if there is some problem in my settings or something. I have Celeron 1700 with 133mhz sdram memory. 4 minute clip takes almost 2 hours to compress (only first pass with below settings) It is really slow. a 2-hour movie would take about 60hours! Isn't it strange?

int 21h
13th June 2003, 06:44
Your lack of memory bandwidth is really killing you :(

JohnMK
13th June 2003, 07:23
Well the average 2 hour movie takes my P4 3.06GHz about 12 hours to encode or such with my XviD settings, I can't imagine a Celeron P4, even with that low memory bandwidth, taking much over 30 or so. Something else gives . . .

junglemike
13th June 2003, 07:30
Well, i'm aware of low memory bandwith of 133 mhz. but i mean that is it is very slow _especially_ with these captures at 768x576. Regular dvdrip takes me about 20-25 hours maximum (with GKnot). Besided, there is almost no difference between P-4 and Celeron P4 (unlike celeron p3) cos they both work on same core speed. cel. has 1/2 cash wich influence is much less than 1% on most apps. That must be some problems with my settings. Filters that i apply are: 1) Smart deinterlace, 2)Temporal smoother(1) 3)Resize filter that's all.

Didée
13th June 2003, 08:37
junglemike,

all you need is a little more patience :D

Okay, seriously:

1. First speed trap
It seems you are filtering your captures within Vdub, what implicates you are running "full processing mode".
Instead, do your filtering in AviSynth, and run Vdub in "fast compress"ing mode. That's the way Gknot is doing the job.

2. Second speed trap
Well, you have activated pretty much everything that makes XviD slow down. Hence, your slow speed is not surprising.
Qpel is slow. VHQ is very slow, and gets awfully slow with the higher settings. Finally, the combination of Qpel+VHQ4 is simply unbearable for your system.
Try to encode some segments without qpel and without VHQ. Look at the speed your getting (aha!), and look carefully if you can see a difference in picture quality at all - propably you won't.
(As a compromise of speed vs. quality, try the following: 1st-pass - no qpel, VHQ0, no chroME(!) -- 2nd-pass - qpel, VHQ2, chroME. That's not 100% exact science, but XviD's 2-pass-routines can scope with that. This tweaking was also inspired once by syskin.)

3. Quality/filtering
a) Set Bframes to 2/150/100/100 or even 255.

(This is the wrong forum for that. Find more info in the Avisynth-Usage forum)
Depending on how your source looks like, try either
b) BicubicResize(x,y,0.333,0.333)
c) Convolution3d(preset=MovieHQ) or MovieLQ
d) you might try PixieDust or GoldDust (after resizing!!) These are very slow filters, but might do wonders in denoising and increasing compressability.
Of course, you still have to deinterlace as first step.

I hope that helps.

- Didée

junglemike
13th June 2003, 08:46
Thank you Didee' i'll try using avisynth and some filters mentioned here. Just one question that i still don' understand:
Does less first pass means more compressibility and tht 2nd pass will look better (at specific tilesize)?

junglemike
13th June 2003, 08:59
You probably right that my xvid settings are wrong(from the point of speed) Just tried to make - Fast recompress in VDub -(at 768x576) and speed is just little bit faster - a little more that (only) 1fps on celeron 1700 and 0.6-0.7 fps on P3-550mhz. I think that avisynth and staying in Yuv colorspace will help, but most chnces bottlenech - vhq. i'll make some other testing

TaZ4hvn
13th June 2003, 21:57
Does less first pass means more compressibility ?

Of course yes since compressibility is (second pass)/(first pass) ratio! So for a given targeted second pass size, the less the first pass is the higher the compressibility is.

But compressibility is not all concerning quality: obviously with very aggressive bframes settings, heavy preprocessing, low resolution ... you could often reach comp=1, but the film will look bad simply because even first pass will look bad :p

So you have to choose some settings you won't go under cause it won't look good to your eyes, i.e. a min resolution (let's say around 150000 pix/frames), minimum xvid settings (for instance bframes at 3/150/100/255) ... test compressibility with this settings first then start increasing settings if there is some margin left from the lowest compressibility you want (say 0.600).

My two cents is compressibility above 0.800/0.850 are a no go, rather change your parameters to keep more details (higher resolution, sharper resizer, less filtering, better bframes ...).

Hope this help.

[EDIT] typo.