View Full Version : What slows down encoding the most.
Enrico Ng
28th May 2003, 04:08
I am trying to figure out ways to speed up encoding.
I am using video captured from TV.
352x240 at MPEG1 15000bitrate encodes at about 30fps, 2pass (so 15fps)
640x480 using Divx5 12000bitrate encodes at abou 6fps, 2pass(so 3fps)
5 times slower doesnt sound right, I am thinking that I am setting something wrong.
for the first one, I use MPEG1 quant
and H.263 quat for the second source ,but I also deinterlace it.
MoonWalker
28th May 2003, 11:01
Well It depenends,
1)The filters in you avs(the resolution also)
2)Chroma Motion
3)VHQ4
4)B-Frames(They are fast compared to CM and VHQ4)
MoonWalker
Enrico Ng
28th May 2003, 15:56
how much does the resolution affect the speed?
I used the same settings
VHQ1, B-frames, Chroma
The only diff is I used MPEG for my MPEG1 video (352x240)
and H.263 for my Divx5 video (640x480)
The MPEG1 goes at 30fps, the Divx5 goes at 6fps
Acaila
28th May 2003, 16:25
Ok now I'm confused. You mention settings in XviD, but you also keep saying that you're using DivX 5. So are you encoding with XviD or DivX 5?
And is the source uncompressed, huffyuv compressed or something else?
Enrico Ng
28th May 2003, 16:29
I am capturing video from TV using my TV Tuner.
I do it in two ways.
1. (352x240) MPEG1 15000 bitrate
2. (640x480 Divx5 12000 bitrate
Then I compress them to a smaller size (shooting for about 10mb/min) using XviD.
(I'm still working on capturing with XviD)
Acaila
28th May 2003, 16:47
Now I get it, thanks :).
The only thing I can think of that can cause this is the fact that MPEG-4 compression (=DivX 5) is more difficult to decode than MPEG-1 compression. The higher resolution does slow things down, but not by as much as you're seeing.
Best would be to capture with HuffYUV or VBLE because they're very fast to decode and lossless, which results in higher quality of your final video. If you have the disk space that is ;).
Enrico Ng
28th May 2003, 16:50
Originally posted by Acaila
Now I get it, thanks :).
The only thing I can think of that can cause this is the fact that MPEG-4 compression (=DivX 5) is more difficult to decode than MPEG-1 compression. The higher resolution does slow things down, but not by as much as you're seeing.
Best would be to capture with HuffYUV or VBLE because they're very fast to decode and lossless, which results in higher quality of your final video. If you have the disk space that is ;).
VBLE?
I tried HuffYUV and PICVIDEO and for some reason (with divx5 recompression) it seems worse than capture when I caputre with divx5.
And the other problem is lack of disk space ;)
do you think that if I captured with XviD, then recompressed it might be faster since its the same codec?
Acaila
28th May 2003, 17:17
You can find VBLE here (http://forum.doom9.org/showthread.php?s=&threadid=53305&highlight=vble). It compresses better than HuffYUV, but it's still lossless so still huge.
do you think that if I captured with XviD, then recompressed it might be faster since its the same codec?I doubt that will make any difference at all.
unmei
28th May 2003, 18:25
huffYUV worse than divx5 ? :D maybe after another recompress ...but at intermediate stage certainly not, huffYUV is lossless (except for eventual colorspace conversion) while the DivX at least applies the quantization if not even already denoising.
And if you really want to recompress a lossy compressed file i think the quantizer matrix used could play a role, ie. watch out that you use twice the same. if you know what matrix divx used in the first encode i suggest you select that one if you do the reencode in xvid - this could avoid some unnecessary loss (i haven't done tests on this, i never even reencoded divxes or xvids for serious, im only talking theory :))
Enrico Ng
28th May 2003, 18:28
I meant after I recompress.
yes After the initial capture, the huffyuv looks much better.
After I recompress the one captured with Divx5 looks better. Even when I use the same settings.
Strange.
bartnl
28th May 2003, 20:48
encoding speed is proportional to size. With your 640x480 / 352x240 this would account for 3.6x slower encoding for the higher resolution. The reason that your speed with divx5 is actually lower is because it is a more advanced / complex codec.
Enrico Ng
28th May 2003, 21:20
I notice this got moved over to the Divx5 forum.
Actually, my question was asking about ways to speed up the XviD encoding.
Acaila
28th May 2003, 21:58
- Don't use VHQ
- Don't use QPel
- Don't use B-frames
- Don't use Chroma Motion
I believe those are the things that slow down the most, in order of magnitude.
Enrico Ng
28th May 2003, 22:03
ok, I'll play around with it.
How fast should I expect a XviD encoding to go?
Do the results that I am getting sound right?
2.5 hours to do a two pass of 15min of video?
(source: 640x480 divx5 15000bitrate)
Quant:mpeg
VHQ:1
Bframe:2
(I also used the Smart De-Interlace filter from Graft).
This goes at about the same speed as if I checked "Enable Interlacing"
I have a
Athlon (Tbird) 1.4Ghz
256 ddr ram
running xp
Acaila
28th May 2003, 22:17
Yes that sounds about right. VHQ, B-frames and deinterlacing can really cut into your speed. Even turning off VHQ could increase it quite a bit.
Enrico Ng
28th May 2003, 22:20
I tested out the deinterlacing, and it doesn't really slow it down that much.
I have VHQ set to 1 only, I guess I didnt know it would have such a big impact. I've read about what each feature does, I'm just not sure how much of an impact on quality they have. I would guess that the longer a feature takes, the more impact it will have to qualtiy.
I guess I have to try to see how big of a difference not using VHQ or not using B-frames makes.
My main goal is to make it look better than Divx5 and still take about the same amount of time to do it. (otherwise I would just use Divx5 ;))
Do you think there would be a large speed increase if I captured using huffyuv first instead of divx or xvid?
If thats the case, I can always buy a Hard drive.
Acaila
28th May 2003, 22:31
I'm quite sure encoding from a HuffYUV source goes faster than encoding from a DivX 5 or XviD source. But you won't know how much until you try it out. Which go for a lot of other things as well btw...
Enrico Ng
28th May 2003, 23:00
Originally posted by Acaila
But you won't know how much until you try it out. Which go for a lot of other things as well btw...
hehe .. yep :p
Enrico Ng
29th May 2003, 16:39
I tried to capture a short clip with huffyuv then recompress to XviD and it took the same amount of time.
My deinterlacing filter seems to cut the speed in half.
VHQ seems to add on 5fps to the speed.
I ran a test last night with a bunch of different settings, I still have to look at the results.
I know with nothing at all, I can get near 30fps.
It drops down to like 18 with the deinterlacing filter
Then like 12 with VHQ 1
if I addon B-frames and chroma, it goes down to 7 or 8
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.