PDA

View Full Version : Get Video File Information


titanic_fanatic
09-22-2006, 09:45 AM
I'm designing a simple program to allow us to include different types of media that are presented in a classroom over the web only to users that we create. At present, the instructor would simply use the upload form in the admin area to include the file in the correct directory ie: /home/user/public_html/classes/theclass/movies/movie.mpg, .avi or .mov.

I want to give the user two choices, either view the file in your browser embedded on a webpage or download. I know how to embed these files, however I need to get the movie dimensions and I can't seem to figure out how to get these values.

I need the dimensions as each file will most likely not be the same size and I don't want to have to make the instructors figure out how to tell the size of their movie for inclusion in the db, I would like to do this with php so that I can dynamically create the embed code for whatever movie is clicked on.

How would I retieve the width and height of a movie file???

Thanks for any and all help,
Titanic_Fanatic

iota
09-22-2006, 04:40 PM
Try this one.


list($width, $height, $type, $attr) = getimagesize("images/your.mov");

titanic_fanatic
09-22-2006, 06:08 PM
I tried this and it doesn't work on movies... only images... any other Ideas...