Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#49 getPixelAspectRatio does not work with wmv files.

open
Todd Kirby
general (27)
5
2011-03-16
2011-03-16
Mark El-Wakil
No

I'm currently trying to detect the pixel aspect ratio for movie files that are imported within our content management system. I see within ffmpeg-php that there's an undocumented method called getPixelAspectRatio. This seems to work for the mpg sample that I have posted, however, it does not seem to work for any WMV files I create:

The simplest way to reproduce this is as follows:

$movie = "movietest.wmv";
$fm = new ffmpeg_movie($movie);
$pa = $fm->getPixelAspectRatio();
echo $pa;

In this case, the result here is blank. When loading a sample .mpg file, I get a result of 1, which I assume is because the aspect ratio is the same as the pixel ratio.

You can see a live example of this here:
http://elevatedx.com/ffmpeg/

Please let me know if you have any questions.

Discussion