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.
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
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/documentati on/QuickTime/ QTFF/QTFFChap2/ qtff2.html# //apple_ ref/doc/ uid/TP40000939- CH204-56313
https:/ /developer. apple.com/ library/ mac/documentati on/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