Back Forum Reply New

Encoding XviD in Virtualdub is so SLOW!

I'm not sure exactly why things encode so slowly on my machine. I'm capturing TV @ 640x480 using HuffyUV, then editing and encoding 2 passes into Xvid with Virtualdub. I get 4-5 fps out of my comp and I can't help but think it should be much higher.  Compression is set to fast, motion search precision is set to 6 - ultra high, and VHQ mode is set to 4 - wide search. Speeds like this remind me of my Celeron 450 encoding movies into VCD.

I'm not applying any filters, btw.

Set VHQ to 1. I saw a thread a while back and it apparently is no benefit using the higher settings. VHQ1 offers best quality and size.
Sorry if I'm misunderstanding, but isn't quot;Fastquot; an option in DivX?

Not sure about DivX, I'm using XviD...

I'll try with a VHQ of 1 and see if it makes a difference.

Originally posted by mbeatle
I'm not sure exactly why things encode so slowly on my machine. I'm capturing TV @ 640x480 using HuffyUV, then editing and encoding 2 passes into Xvid with Virtualdub. I get 4-5 fps out of my comp and I can't help but think it should be much higher.  Compression is set to fast, motion search precision is set to 6 - ultra high, and VHQ mode is set to 4 - wide search. Speeds like this remind me of my Celeron 450 encoding movies into VCD.

I'm not applying any filters, btw.

Some more info needed.
How fast is your machine?
What kind of editing?
You wrote that you dont use any filters!?!
Fast recompress on?
Avisynth for frameserving?
Which XVID settings?

Not enough info to help out.
Post a logfile.

Cheers

Taurus

P.S.: I get almost 25 frames with Huffy@640x480 with xvid slightly tuned settings on an AthlonXP 2600+

man, there's something WRONG with your setup...

i'm on a p3-733 and i get higher framerates for 640x480 WITH heavy avisynthing.

do you have GMC turned on?  i always leave it off because sod-all mpeg-4 standalones support 3 warp points (quot;divxquot; certification has a LOT to answer for as far as mpeg-4 compliance goes).  apparently it slows things down a lot.

Sorry, I copied this post from another forum where I have my rig posted in my signature.  Here it is.

No, I do not apply any filters.  I was put off by the speed so much that I didn't want to make it any worse.  I'm not using AviSynth or a frameserver, just Virtualdub.

Basically my editing consists of a TV show where I select the sections of program and leave the commercials out.  I then use Virtualdub to merge the 4 avi files that I get.

I'm not sure what GMC is.  Where is the option for that?

I'll look for a logfile when I get home.

Here's the log I got from encoding one segment using 2 passes:

[i] Starting up: VirtualDub build 18160/release
[*] AVI: Opening file quot;E:\PVR\goodeats0903-1859(S-Video).aviquot;

[i] AVI: OpenDML hierarchical index detected on stream 0.

[i] AVI: OpenDML hierarchical index detected on stream 1.
[*] AVI: Opening file quot;E:\PVR\goodeats0903-1859(S-Video).aviquot;

[i] AVI: OpenDML hierarchical index detected on stream 0.

[i] AVI: OpenDML hierarchical index detected on stream 1.
[*] Beginning dub operation.
[*] Ending operation.
[*] AVI: Opening file quot;E:\PVR\goodeats0903-1859(S-Video).aviquot;

[i] AVI: OpenDML hierarchical index detected on stream 0.

[i] AVI: OpenDML hierarchical index detected on stream 1.
[*] Beginning dub operation.
[*] Ending operation.

1. Be sure to set Vdub to quot;fast recompressquot;.

2. In XviD's config window, hit the quot;defaultquot; button.

3. Start the encoding

4. Then report back what speed you're getting ...

Try opening the task manager while it's encoding to make sure that VirtualDub is using most of the CPU.

Setting everything to default (VHQ mode went back to 0) I got 22-28 fps, depending on motion.  With VHQ back @ 4, I'm clocking 6-7 fps.  That's an improvement, but shouldn't I expect better?

CPU usage is pegged @ 50-55% (this cpu has hyperthreading) which means virtualdub is not using more than one thread, at least not very efficiently.

VHQ 4 isn't really worth it if you're hoping for speed.  It doesn't bring too much additional quality either.  Most people just stick to VHQ 1.

It's not vdub's fault, it's rather the codec itself that doesn't support hyperthreading. With only 50 % of your processing power used, your encoding fps are what you should expect them to be. Disable hyperthreading if you want to double these numbers.

i think you shouldn't use overclockled system

Originally posted by mbeatle
Setting everything to default (VHQ mode went back to 0)

Now, what's that. VHQ default should be 1, not 0. At least for the 1.x builds I have tried.

What is reported (build version and date) if you click quot;aboutquot; instead of quot;configurequot; in Virtualdub?

Build 18160, Dec 2, 2003.

You should _really_ use a newer build (v1.0.2)

also, if you're hyperthreading, you could save time by doing 2 encodes at once... just set 2 encodes going in separate VD windows, and then set their affinities to the different fake CPUs.

even at 50% of you CPU you should be getting some serious speed.  definitely use one of the latest builds... Xvid has moved on greatly since 2003 (wish i could say the same for divx, nudge nudge)

I´m coding my first movie with GKnot 0.28.8 and the Xvid 1.0 Codec on my 2,8GHz hyperthreading System.

It is interessting, that the CPU usage is @ ~100% on the 1-pass and only @ ~65% on the 2-pass.
Does anybody know why the CPU usage is so different between the two passes?

BR,
Dirk

At the first pass, I guess that the avisynth script is as fast as XviD. Since it runs in another thread, it uses all the remaining processing power.

At the second pass, XviD is by far slower than avisynth, hence avisynth doesn't half the processing power to do all its computation, hence you still have 35 % of processing power left.

Perhaps a naively question: Why doesn´t XviD take the unused 35% to do its work faster?

Edit:
The Credits of the Movie were encodet with ~95% at the second pass...
¥
Back Forum Reply New