Hi all!
I’m working on a site and the owner wants a method to determine the playing length of a video upon uploading it to the server. Is there a method to determine the length of the video? I know that using file size isn’t a really reliable method as to the variance of file size, compression, quality, etc.
Any help in this quest would be greatly appreciated!
Most video files start with a header that has some meta information about the file, this most of the time also contains the length of the video. But this is not true for all fileformats. So you would have to write (or find) some code to read that header.
What type of video files do you have ?
If you manage your own server, you could put this there:
http://ffmpeg-php.sourceforge.net/
If you have your own server, but don’t know how to install it, the author will install it for you for $75
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
The file types would vary and be up to the person uploading. The unique thing is that the files will then be translated into a flash file and then put on the server.