Video Resolution

The place for "I can't figure out how to..." questions.
Post Reply
scream479
User
Posts: 1
Joined: Mon Mar 12, 2007 4:08 pm

Video Resolution

Post by scream479 » Mon Mar 12, 2007 4:28 pm

Hi,

At first, sorry about my bad english :-/
I am from austria, i try my best ;-)

I will extract the resolution_x and resolution_y from a video File (WMV).

In some docus i read that this is possible with:
$fileinfo['video']['resolution_x'];

But in my try, its only possible over this way:
$fileinfo['video']['streams'][2]['resolution_x'];

My question is:
Is this always different?
How do i know, when i must use...
> $fileinfo['video']['resolution_x'];
or
> $fileinfo['video']['streams'][2]['resolution_x'];

Thank you for helping!

Best regards from vienna!
Max

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Post by James Heinrich » Tue Mar 13, 2007 12:31 am

It's always safest to look at $fileinfo['video']['streams'][$i]['resolution_x'] -- there may be multiple resolutions inside a video file (especially in WMV format) and so if you examine the different sizes listed (even if only 1) you can decide how you want to use that information.

The shortcut version ($fileinfo['video']['resolution_x']) is provided for convenience and usually equals the highest-resolution version of the video, but you'll get more predictable results with the ['streams'][$i] values.

Post Reply