Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

MPEG1,2 - reading info from MPG

papepape Posts: 1Member
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.