Working with MPEG files

Shurik

Member
Joined
Nov 29, 2003
Messages
7
Dear all,

Currently I have a little program which currently reads MPEG file headers and displays info such as frame rate, resolution and aspect ratio. However, I cannot find any info on how to read the length of an MPEG movie as there does not seem to be any header information for it. The same goes for bitrate. I was told to read the entire file in and count number of frame rate headers and then divide it by the frame rate. This works, somewhat, but it takes a relatively long time to find this, especially on 100Mb+ files. I am sure this is possible without having to read the whole file in, but perhaps I have to use MCI controls? No idea about that, so examples would be nice :D

Another thing I need to do is to display a random screenshot from the opened MPEG file in a picture box, and (hopefully) be able to make a JPEG file from it. I guess I definitely need to use MCI controls there unless I write my own decoder, which I dont really fancy doing!

Any pointers appreciated!

Thanks :)
 
Back
Top