Log in

View Full Version : DivX Encoding and BITMAPINFOHEADER biSizeImage value


achibus2
24th February 2010, 21:07
I try to find out the meaning of the biSizeImage value in a video encoded with DivX.
Identical recording settings produce videos with different biSizeImage values on the very same machine.

Here is what I’m doing:
I record and encode from a live stream (video camera, video only) to an avi file.

These are the encoder settings:
-b1q 8.5 -r 640,480,6 -pre 2 -dir "C:\Program Files\DivX\DivX" -pq 7670 -b 3 -nf -deinterlace=1 -thread_delay=1

NTSC:
Most video clips have an image size of 1036800 some are producing an image size of 691200

PAL:
Most video clips have an image size of 829440 some are producing an image size of 1244160

This makes it impossible to append this videos without re-rendering. (I mean append NTSC with NTSC and PAL with PAL - and not NTSC with PAL :))

I patched the avi header of one video and changed the image size from 691200 to 1036800 and it had no impact on the playback of video. This made it possible to append the video.

So I’m really interested to find out what this image size stands for. Does anyone know where to find more information or why I have different image size although the encoder settings are the same?

Thank you for you answers

DigitAl56K
25th February 2010, 20:26
1036800 = 720 * 480 @ 24bpp
691200 = 720 * 480 @ 16bpp
1244160 = 720 * 576 @ 24bpp
829440 = 720 * 576 @ 16bpp

I.e. your capture app is writing the frame size at the input of the encoder, not the output, and sometimes it is considering the video to be 16bpp vs 24bpp - maybe sometimes it connects to the capture filter in different color spaces? I don't know why this is happening. Bug in the app.