I have this PHP code:
Code: Select all
<?php
include_once('getid3/getid3.php');
$getID3 = new getID3;
$file = $getID3->analyze('clip.MOV');
$width = $file['video']['resolution_x'];
$height = $file['video']['resolution_y'];
echo "Width: ".$width;
echo "Height: ".$height;
?>
When using a video in landscape/horizontal format everything is fine.
But when using a video in portrait/upright format I'm getting height as width and vice versa.
When editing a portrait/upright video in a video app and re-saving it, it's working fine when uploading.
I think there's something with the metadata.
I already read this topic: https://www.getid3.org/phpBB3/viewtopic.php?t=1908
I tried the following:
Code: Select all
<?php
include_once('getid3/getid3.php');
$getID3 = new getID3;
var_dump($getID3->analyze('my_clip.mov'));
?>
Searching for "rotate" only gives me the following twice: ["rotate"]=> int(0)
Any idea how I can find out the orientation?
Thanks,
Dave.