Hi Everyone,

Thanks for your replies!

I now have a first-pass solution working. Basically I iterate over the entire 
file, and count the number of times I get STATE_PICTURE from the mpeg2_parse 
function.

This works, but it's horribly slow. A 24 minute clip (400 MB on disk) takes 
over a minute to parse (84 seconds).

However, I notice that when I open the file in a media player (VLC for 
example), it displays the duration instantly.

I was hoping someone here would know a few tricks to speed up this performance. 
One thing I have thought of is increasing the size of my memory buffer from 4KB 
to some larger value, but it doesn't seem to help that much (using 8KB reduces 
the time from 84 to 81 seconds).

Is there something I'm missing? I can't help but feel that my algorithm is 
horribly naïve - there must be a better way to do this. Is this the best 
performance I can reasonably expect?


Thanks again!

--
Thomi Richards
Programmer

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Libmpeg2-devel mailing list
Libmpeg2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel

Reply via email to