note 30060 deleted from function.getimagesize by cmb

From: Date: Sun, 18 Dec 2016 09:38:33 +0000
Subject: note 30060 deleted from function.getimagesize by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208626@lists.php.net to get a copy of this message
Note Submitter: robertks at hotmail dot com ---- For those of you trying to derive the dimensions of a video file (e.g. Video for Windows AVI, Quicktime MOV, MPEG MPG, Windows Media Video WMV or ASF, etc.), you will find the getid3 library to be indispensible. Found at http://getid3.sourceforge.net, here's an example of its use in a script: include_once('getid3.php'); // or wherever you actually put the getid3 scripts $file_location = './myvideo.avi'; $file_info = GetAllFileInfo($file_location) // calls getid3 function $file_width = $file_info['video']['resolution_x']; $file_height = $file_info['video']['resolution_y']; You can then use your OBJECT and EMBED tags in HTML to put the video into a web page, and make the PHP template independent of the size parameters of the particular video it happens to be loading. (Just remember to add pixels to the video height to accomodate the controller of the embedded player: typically, 16 pixels for Quicktime, 46 pixels for Windows Media Player 6, and 64 pixels for Windows Media Player 7.

« previous php.notes (#208626) next »