Log in

View Full Version : Encoding speed question [Solved: problem came from packed bitsream]


TsunaQuake
20th May 2004, 14:30
Hello peeps
I've got a P4C 3Ghz and I'd like to know how fast it should encode an XviD movie, given that the movie's resolution is about 640x352 and the video bitrate is 1420 and that the following AVS filters are enabled:

Temporalsoften(3,5,5,mode=2,scenechange=10)
FluxSmooth(7,7)

The XviD codec's quantization type is set to MPEG and chroma motion is on.

I'm encoding in 2 passes with the latest version of the XviD Codec (version 1 final)

(Have I missed anything else that should impact the perf's?)

I'm doing both passes at the same-ish speed, that is about 22fps which is... rather slow...

I used to encode at about 55fps with the previous version of the XviD Encoder.

Thanks a lot,
- Tsuna

Tuning
20th May 2004, 19:10
Originally posted by TsunaQuake
I used to encode at about 55fps with the previous version of the XviD Encoder.


Are you sure you are using same avisynth settings?

I think there will be some speed improvements in final as syskin said.:)

mostlyharmless
20th May 2004, 19:31
Perhaps you set Wide VHQ? That should drop down your perf a bit.

Didée
20th May 2004, 21:58
Originally posted by TsunaQuake
...
Temporalsoften(3,...
FluxSmooth...
...
chroma motion
...
I used to encode at about 55fps with the previous version of the XviD Encoder.
Erh, you must have mixed something up.

On a 2.6 GHz Celeron, I can't reach anything like 55 fps for only previewing. Feeding an mpeg-2 source into your script (plus initial bilinear resizing), it's in the 30~35 fps range. And you previously wanna have encoded at 55 fps? I'm tempted to say "nonsense".

If your "previous version" of XviD was a pretty old one, without VHQ, without B frames, without qpel, without *everything* ... then, yes, then it might have been considerably faster than XviD 1.0.

You gave too little information on your exact procedure(s) to draw any useful conclusions. But from the numbers you have thrown, I'm sure you are comparing apples and oranges, in one way or another. Either on the script's side, or on the encoder's side, or on the source's side.

Try again, with enough information so that your encoding procedure can be 100% reproduced by others:

- exact XviD version (the "previous one")
- exact avisynth script
- format (& codec) of the source (yeah, this *is* important!)

If we're able to do exactly the same you did, the we can tell you something.

... because actually, in respect to all the features it offers, XviD is faster than it ever had been.


- Didée

TsunaQuake
20th May 2004, 23:34
Originally posted by Didée
[...]Feeding an mpeg-2 source into your script (plus initial bilinear resizing), it's in the 30~35 fps range.
I didnt quite get the meaning of that... why should it be in the 30~35 fps range?
Originally posted by Didée
If your "previous version" of XviD was a pretty old one, without VHQ, without B frames, without qpel, without *everything* ... then, yes, then it might have been considerably faster than XviD 1.0.
I'm sorry for being so unprecise about this "previous version" i've uninstalled it and deleted the install file, but I'm sure it was the version that came out before the last version before 1.0 (emm.. hopefully... you get the idea)
Originally posted by Didée
Either on the script's side, or on the encoder's side, or on the source's side.
Only the codec changed. Otherwise the source and the script are exactly the same (see hereafter)
Originally posted by Didée
- exact XviD version (the "previous one")
- exact avisynth script
- format (& codec) of the source (yeah, this *is* important!)

Ok so i've already tried to tell you what was this "previous version" now here is the avs script, used to encode several VOBs:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\undot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\VSFilter.dll")

mpeg2source("S:\DVDRip\MONSTERS_INC\VIDEO_TS\monster.d2v")
crop(10,12,700,548)

Undot()

Temporalsoften(3,5,5,mode=2,scenechange=10)
FluxSmooth(7,7)

VobSub("S:\DVDRip\MONSTERS_INC\monster")

LanczosResize(640,336)

limiter()

Originally posted by Didée
... because actually, in respect to all the features it offers, XviD is faster than it ever had been.

That's exactly why I've made this post
My perfs' have decreased so much that I can't explain myself the reason of this loss of fps

The source is simply 3.31Gb of VOBs (then I used DVD2AVI)

TsunaQuake
20th May 2004, 23:37
oh and by the way, i've done some tests on a brand new installed computer, using two Bartons 2500+, the perfs were similar if not the same as my current config (that is, the P4C 3.3Ghz) I only had a gain of 4~8fps :/

Didée
21st May 2004, 00:07
Originally posted by TsunaQuake
... I'm sure it was the version that came out before the last version before 1.0 (emm.. hopefully... you get the idea)
Oh yes, I get lots of ideas ;)

It could probably have been XviD 1.0 RC3. But from that description it could as well have been *any* version of XviD ... depends on what you call "coming out of a version". If a "version" for you is a so-called "stable release", then the version before the version before 1.0 is ... stone old.

However. I mostly assume you didn't use the same codec settings. I can switch OFF some settings in XviD, and encoding performs around 40 fps, without any filtering. Then I'll switch ON some settings (well, all of them), and XviD will encode at 4 fps.
That's a difference of factor 10. Or, to make it sound more dramatic, it's a difference of 1000%.

And you want to have some explanations for your nebulous scenario...

Finally, if you're using default settings in XviD, then your speed of ~22fps along with your AviSynth script is just fine. There's nothing wrong with that. By the time you firstly posted, I wasn't concerned about the 22fps, but I wondered about the 55.

[fresh post appeared]

A dual processor setup will not perform that much faster per se. With the right setup, you'll assign all the decoding & all the filtering to one CPU, and all the encoding to the other.
But if the mere encoding takes, say, 90% of all CPU cycles, then the overall gain will be pretty small - just what you've experienced. The encoding itself cannot be splitted between the CPUs, so that in most cases one CPU will max out with encoding to XviD, while the other does a little decoding and filtering, but will be twiddling thumbs most of the time.

Again, there is nothing wrong with that. Everything seems fine.


- Didée

TsunaQuake
21st May 2004, 18:45
No, I'm sorry, there's definitly something wrong with it.
I've done some testing on a (single) Barton 2600+ and it was encoding faster than my P4C 3.3Ghz and faster than my Bi-Barton 2500+
I've made sure that the codec where configured exactly the way they used to be before.
I've burnt the installer of the version I was formerly using on a DVD, I'm gonna check what was that version as soon as I can get my hands over it.

Oh, I've just triple-checked the settings, and the checkbox "packed bitstream" was checked, whereas it wasn't checked on the older codec... maybe... hmm let me do some testing before I press the Submit Reply button...

[does some testing...]

YESSSSS
that's it!!
I'm now encoding the first pass at about 40fps will having about 50 other processes working in memory!!
The second pass performs at the same speed-ish.

Now, the question.
What is exactly this feature? Should it be enabled?
I think that if you can simply give me a link I'll be able to answer the second question myself.

Thanks.

- Tsuna

PS: The Bi-Barton seems to use both processors as much as possible while encoding. Windows reports that they're both used at 100%-ish. But then it's true that one processors might do the whole thing alone and the other one is simply used for some smallers things.
Oh and what was this thumbs twiddling you were talking about Didée?

Didée
21st May 2004, 20:30
It gets more and more interesting. You are the first person to report that "packed bitstream" is slowing down the encoding. Uncountable numbers of users are using that feature, but none of them discovers the slowdown.

I'm glad you found your solution.

But now tell me why checking or unchecking "packed bitstream" doesn't make the slightest difference in encoding speed for me?

Answer: because that's the way it's supposed to be.

Sorry, I've gotten tired of it now.

- Didée


[edit] your link (http://forum.doom9.org/showthread.php?s=&threadid=72903) - one of many possible. Imagine, this forum is searchable (http://forum.doom9.org/search.php?s=)!

TsunaQuake
21st May 2004, 21:58
well thanks a lot
it's indeed rather weird then... very weird even...
thanks for the link
yup the forum is searchable... slap me please ^^