I need to get the width and height of a .mov-file with php. How do I do that?
Asked
Active
Viewed 1,815 times
1 Answers
6
I have used getid3 in the past to achieve this you can grab it from http://www.getid3.org/ I am not sure how well maintained it is anymore
You could knock up some code to look similar to this
<?php
include_once('getid3.php');
$getID3 = new getID3;
$file = './file.mov';
$file_analysis = $getID3->analyze($file);
echo 'Video Resolution = '.$file_analysis['video']['resolution_x'].' X '.$file_analysis['video']['resolution_y'];
?>

houmam
- 464
- 2
- 5
-
This also works for `.mp4` files (tested) and many other formats (untested). – hitautodestruct Dec 11 '12 at 11:36