Apple video rotation... Exif?

The place for "I can't figure out how to..." questions.
Post Reply
Posts: 1
Joined: Tue Dec 08, 2015 1:20 pm
Are you a spambot?: no

Apple video rotation... Exif?

Post by SplendidSuns » Tue Dec 08, 2015 1:28 pm


I'm trying to use getID3 to get the orientation of Apple videos. It seems that if an iPhone user takes a video with the volume buttons up then the video records upside down. Apple then add a tag of some sort which all Apple software reads to rotate the video to make sure it plays the right way up but when a user uploads a video to my site it is actually upside down. I want to find this orientation tag so I can rotate these videos as needed.

At the monent I'm doing this

$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filepath);

Which is giving me a lot of info but nothing it seems for the orientation. I read somewhere that the orientation is in the exif info but I can't seem to see this either?

If anyone could help point me in the right direction it would be hugely appreciated.

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

Re: Apple video rotation... Exif?

Post by James Heinrich » Sun Dec 13, 2015 10:12 am

If I recall correctly, I believe that data is parsed by getID3, but I'm travelling at the moment and don't have access to my test files. If you could supply a very small test file (no more than 1MB, less is better) I'll see if I can take a peek. If you could supply 4 such test videos in all 4 orientations (landscape, portrait, inverse-landscape, inverse-portrait) that would be very helpful for my test-file collection. Length and content doesn't matter, 0:01 long of a blank wall would be fine.

Post Reply