Demo programming

Moderators: None (Apply to moderate this forum)
Number of threads: 151
Number of posts: 333

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
MPEG1,2 - reading info from MPG Posted by pape on 15 Mar 2011 at 7:06 PM
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.






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.