简体   繁体   English

使用PHP获取QuickTime剪辑(.mov)的宽度和高度?

[英]Get width and height of quicktime clip (.mov) with php?

I need to get the width and height of a .mov-file with php. 我需要使用php获取.mov文件的宽度和高度。 How do I do that? 我怎么做?

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 我过去曾使用getid3来实现此目的,您可以从http://www.getid3.org/上获取它我不确定它的维护程度如何了

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'];
?>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM