GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Scripting: Check size of a video file? (WMV/FLV) - PHP (https://gfy.com/showthread.php?t=827428)

Voodoo 05-09-2008 10:16 AM

Scripting: Check size of a video file? (WMV/FLV) - PHP
 
Does someone have a method for checking the dimensions of a video, not using meta data? Here's the thing... I have some videos that don't have metadata, FLV&WMV for the same video... In Windows, the size of the WMV shows up as 320x240, but not the FLV. It's safe to assume that each FLV is the same size as the corresponding WMV.

How do I read this size info that Windows sees in PHP?

Tempest 05-09-2008 10:21 AM

You could install ffpmeg or mencoder on your server, exec it and then parse the output.

RyuLion 05-09-2008 11:08 AM

http://www.webcamcash.com/pics/showp...rnet%20186.jpg

GrouchyAdmin 05-09-2008 11:10 AM

So, you want to get these numbers.. by osmosis?

k0nr4d 05-09-2008 11:25 AM

you can use ffmpeg-php extension or you can look for a class called getid3

munki 05-09-2008 11:29 AM

ffmpeg-php = win

fris 05-09-2008 11:29 AM

http://getid3.sourceforge.net/

fris 05-09-2008 11:49 AM

if you are using ffmpeg-php check out

getduration
getframewidth
getframeheight

fris 05-09-2008 01:47 PM

Quote:

Originally Posted by Voodoo (Post 14169977)
Does someone have a method for checking the dimensions of a video, not using meta data? Here's the thing... I have some videos that don't have metadata, FLV&WMV for the same video... In Windows, the size of the WMV shows up as 320x240, but not the FLV. It's safe to assume that each FLV is the same size as the corresponding WMV.

How do I read this size info that Windows sees in PHP?

As soon as you compile ffmpeg-php:

<?
$movie = new ffmpeg_movie('trailer.flv');
$height = $movie->getframeheight();
$width = $movie->getframewidth();
echo "$width x $height";
?>

Voodoo 05-09-2008 07:34 PM

Quote:

Originally Posted by Fris (Post 14170832)
As soon as you compile ffmpeg-php:

<?
$movie = new ffmpeg_movie('trailer.flv');
$height = $movie->getframeheight();
$width = $movie->getframewidth();
echo "$width x $height";
?>

Mmmmm.... That's sexy.


All times are GMT -7. The time now is 12:44 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123