Question

I need to get the width and height of a .mov-file with php. How do I do that?

Was it helpful?

Solution

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'];
?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top