Log in

View Full Version : encoding efficiency


Terka
4th November 2007, 14:56
tried to encode a clip to xvid1.2 using:
1. 25fps
2. 50fps
3. 50fps done from 25fps duplicating the frames (every even is same as odd)
got these filesizes for same kvantizer (3):

1. _7,5 MB
2. 13.5 MB
3. 10.5 MB

why the 3. is so big, when there is not much information more?
or what am i doing wrong when encoding?

jethro
4th November 2007, 15:08
Why don't you try the same procedure with a different codec, like x264, and compare the results.
I always see very small frames in xvid when there is little-to-no motion - a difference in your clip should not be that big.

sysKin
4th November 2007, 17:23
3 is bigger than 1 because extra frames affect b-frame placement. You can counter that as much as you want by increasing bframe bias.

Manao
4th November 2007, 18:30
Motion vectors in bframes in mpeg4 are temporally predicted. So when frames are identical, it's more efficient to code them as P skipped.

Didée
4th November 2007, 22:13
>> Motion vectors in bframes in mpeg4 are temporally predicted. So when
>> frames are identical, it's more efficient to code them as P skipped.

... and subsequently, that's why you can't encode the artificial 50fps stream (3) with a comparable efficiency (like expected at first glance), compared to the 25fps stream (1), despite the added information is 100% redundant.

Using P-skipped to exploit the "compressability" of the doubled frames in (3), you can't reach the coding efficiency that the 25fps original got from B-frames.
Encoding the 50fps stream (3) with forcing on B-frames, the data in the doubled frames is not redundant anymore to the codec, since the temporal prediction of B-frames suddenly creates residuals that have to be coded.

Hence, a "comparable" coding efficiency on the 50fps stream (3) can only be reached if the 25fps stream (1) was encoded without B-frames.

Manao
4th November 2007, 22:26
Alternatively, you can use an AVC codec : there, motion vectors in bframes are either spatially predicted or temporally predicted. On a duplicated frame, spatial prediction will work perfectly (everything will be skipped).

Terka
5th November 2007, 12:08
thanks for explanation, ill try x264