tbare Posted November 20, 2007 Share Posted November 20, 2007 hello, all... i'm looking for something like: getimagesize() but for video files (avi, wmv, mpeg...) reason being is this: if i take the hard-coded ( width='x' height='x' ) out of the string of an embedded video, it shows up fine in IE, but firefox is all distorted. if i hard code ( width='500' height='500' ), and the video file is larger than either of those 2 dimensions, the video is distorted, so i would need to scale the video down to fit in the that size window. is there anything out there for this?.... please?? Quote Link to comment https://forums.phpfreaks.com/topic/78131-need-help-geting-widthheight-of-a-video-file/ Share on other sites More sharing options...
trq Posted November 20, 2007 Share Posted November 20, 2007 is there anything out there for this? Not through php, ffmpeg maybe? Quote Link to comment https://forums.phpfreaks.com/topic/78131-need-help-geting-widthheight-of-a-video-file/#findComment-395373 Share on other sites More sharing options...
tbare Posted November 20, 2007 Author Share Posted November 20, 2007 well, that sucks... are you familiar w/ ffmpeg at all? i'm not (in the least bit)... Quote Link to comment https://forums.phpfreaks.com/topic/78131-need-help-geting-widthheight-of-a-video-file/#findComment-395383 Share on other sites More sharing options...
trq Posted November 20, 2007 Share Posted November 20, 2007 Actually, looking at the ffmpeg manual, it doesn't look like it can find such details either. Quote Link to comment https://forums.phpfreaks.com/topic/78131-need-help-geting-widthheight-of-a-video-file/#findComment-395387 Share on other sites More sharing options...
tbare Posted November 20, 2007 Author Share Posted November 20, 2007 well, thanks for tryin, anyway... i checked out the manual, and couldn't find it, either... at least i'm just not that lost :-D Quote Link to comment https://forums.phpfreaks.com/topic/78131-need-help-geting-widthheight-of-a-video-file/#findComment-395391 Share on other sites More sharing options...
alecks Posted November 20, 2007 Share Posted November 20, 2007 http://ffmpeg-php.sourceforge.net/ http://ffmpeg-php.sourceforge.net/apidoc.php It looks pretty simple $movie = new ffmpeg_movie(String path_to_media, boolean persistent); $height = $movie->getFrameHeight(); $width = $movie->getFrameWidth(); ffmpeg-php needs to be installed, though. Quote Link to comment https://forums.phpfreaks.com/topic/78131-need-help-geting-widthheight-of-a-video-file/#findComment-395436 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.