#49 getPixelAspectRatio does not work with wmv files.

general (27)

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:

Please let me know if you have any questions.


Log in to post a comment.