MPEG1,2 - reading info from MPG

Hi all,
I need to find the *.MPG file, MPEG-1/2 information on the duration and number of frames by reading the file bytes.

My way is now:
Duration_mS = lastGOPTime_mS - firstGOPTime_mS + (I_FramesCnt/Framerate)
Frames = Duration_mS / 1000 * FrameRate
where:
GOP = 0xB8010000 packet.
I_FramesCnt is 0x00010000 packets.

This method is quite satisfactory, but probably not very accurate.
I can use MCI-commands (on MS-Windows), but not want.

Any idea, principe ? May be in VB or C.

Thanks everyone.



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories