I'm trying to calculate the duration/length of a .wmv movie. It's about 512 kbps wmv format.
How can i do this?
I think theres a field in the header of wmv files that indicates the length of the movie. Google up the format spec and write something to query the headers.
ok, thanx.
I already wrote a simple php script but everytime the difference was a (average) 30 seconds with the real length.
And if the headers contains this info, is it possible to use php to read it out?
Of course its possible. Just fopen the file, read the first however many bytes make up the header, and parse it.
You may want to check out http://getid3.sourceforge.net/