-
November 12th, 2007, 10:41 AM
#1
Find out the width and height of a video
Is there anything similar to getimagesize to get the width and the height of a video?
I´ve uploaded some videos to my server and would like to find out those infos using php.
Any ideas?
-
November 12th, 2007, 01:11 PM
#2
Re: Find out the width and height of a video
I have yet to see this done. I even checked at PHP Classes.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
December 11th, 2007, 10:39 AM
#3
Re: Find out the width and height of a video
Well depending on the video formats you have you can use
http://getid3.sourceforge.net/
-
December 11th, 2007, 12:16 PM
#4
Re: Find out the width and height of a video
That gets tag information. Dimensions are not stored in ID3 tags.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
December 12th, 2007, 05:16 AM
#5
Re: Find out the width and height of a video
getid3() is not only about id3 tags!
From the HP
"getID3() is a PHP script that extracts useful information from MP3s & other multimedia file formats"
e.g.
PHP Code:
<?php
require_once('getid3-2.0.0b4/getid3/getid3.php');
$getID3 = new getID3;
$filename = "vid/clock.avi";
$fileinfo = $getID3->analyze($filename);
echo "<pre>";
print_r($fileinfo);
echo "</pre>";
?>
will give you back
PHP Code:
.............................
.............................
[video] => Array
(
[bitrate_mode] => vbr
[dataformat] => avi
[resolution_x] => 321
[resolution_y] => 321
[total_frames] => 12
[frame_rate] => 1
[fourcc] => RLE
[codec] => Microsoft Run Length Encoder
[pixel_aspect_ratio] => 1
[lossless] =>
[bits_per_sample] => 8
[bitrate] => 43622.6666667
[compression_ratio] => 0.0529190645795
)
......................
......................
check-out
http://getid3.sourceforge.net/source/structure.txt
for the whole structure
Here you can find more examples
http://getid3.org/phpBB2/viewforum.php?f=3
Last edited by blueday54555; December 12th, 2007 at 05:18 AM.
-
December 12th, 2007, 07:48 AM
#6
Re: Find out the width and height of a video
Ah, I missed that. Nice work!!!
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|