من الان تست کردم ، بدون مشکل کار کرد ، کدش خیلی ساده است، من نمیدونم شما چیکار میکنید.
این یک نمونه کامل :
کد:
require_once('../getid3/getid3.php');
$filename = './video.mp4';
set_time_limit(0);
$url = 'https://dl.wpheart.ir/vid.mp4';
$fp = fopen (dirname(__FILE__) . $filename, 'w+');
$ch = curl_init(str_replace(" ","%20",$url));
curl_setopt($ch, CURLOPT_RANGE, '0-200000');
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
fclose($fp);
// Initialize getID3 engine
$getID3 = new getID3;
$file = $getID3->analyze($filename);
echo "Duration: ".$file['playtime_string']." / Dimensions: ".$file['video']['resolution_x']." width by ".$file['video']['resolution_y']." height"." / Filesize: ".$file['filesize']." bytes<br />";
خروجی کد بالا :
کد:
Duration: 2:47 / Dimensions: 1280 width by 720 height / Filesize: 200001 bytes
همینطور که میبینی ، حجم فایل فقط ۲۰۰ کیلوبایته (200000 بایت) و اطلاعات ویدیو رو کامل نشون داده.