PDA

View Full Version : Height , width of MPEG file


mario_a
8th May 2002, 05:26
Hi,

How can I obtain the display height and width of an MPEG file?
Is there any simple way to do this in code?

Thanks in advance,
Mario

aquaplaning
24th May 2002, 22:05
i found this by accident at http://www.wotsit.org/search.asp?page=2&s=animated

Sequence Header
This contains information related to one or more "group-of-pictures"
Byte#, Data, Details:
1-4, Sequence header code, In Hex 000001B3
12 bits, Horizontal size, In pixels
12 bits, Vertical size, In pixels

so:
search trough a mpeg1 file for "00 00 01 B3".
the first 12 bit from the following 3 byte contain the width...