Still reproducible in 12.04.

It seems that the QuickTime file format uses a 3x3 transformation matrix
to encode a mapping from 'camera space' to 'display space'. In the case
of simple 90° and 180° rotations that matrix is all zeros and (minus)
ones. So, this should just be a case of getting the bytes of the
transformation matrix and working out which way to do the rotation.

https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-56313

https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-18737

An algorithm might go like:
parse bytes looking for 'mvhd'
skip ahead 36 bytes
read the next 36 bytes into a 3x3 matrix (4 bytes per element)
calculate the rotation
do the rotation during playback

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gstreamer0.10 in Ubuntu.
https://bugs.launchpad.net/bugs/697756

Title:
  iPod and iPhone movies are played with incorrect orientation

Status in “gstreamer0.10” package in Ubuntu:
  Confirmed

Bug description:
  Movies made with iPods and iPhones are encoded with orientation
  information, because users hold them in arbitrary positions when
  recording movies (they are meant to, there is no right way to hold an
  iDevice, apparently.  Unless you are making a call on an iPhone 4).
  At the moment I see upside-down and sideways movies sent from iPhones
  and iPods.

  If you hold the device on its side while recording a movie, playback
  should recognise this and have gravity in the recording represented in
  the most sensible representation on the display device (in most fixed
  monitors I guess this is positive on the Y axis, if (0,0) is on the
  top left).  I.e. match gravity in the recording to gravity on
  playback.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.10
  Package: libgstreamer0.10-0 0.10.30-1build2
  Uname: Linux 2.6.37-rc8-linus x86_64
  Architecture: amd64
  Date: Wed Jan  5 17:08:02 2011
  ExecutablePath: /usr/bin/totem
  InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100412)
  ProcEnviron:
   LANG=en_GB.utf8
   SHELL=/bin/bash
  SourcePackage: gstreamer0.10

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gstreamer0.10/+bug/697756/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to