1

When using setOrientationHint for recording videos, Samsung and Motorola phones simply write this value into the Rotation Metadata.

However, it appears HTC phones do not write this value into the metadata and actually attempt to rotate the video after recording. The phones I have tried on Android 4.0.3 and lower actually rotate it 90 degrees no matter the value and the 4.0.4 phones rotate it as per the value.

Has anyone else noticed this behavior and what is the best way to fix this?

haupman
  • 59
  • 7
  • yes and it is frustrating me to no end >.< though it isn't clear to me that the HTC phones are rotating the video... it seems as though the orientation hint i give is just off. For instance, for front facing cameras I usually need to give 270 but on many HTCs I need to give 90. This isn't all HTC devices though... – Daniel Smith Feb 07 '13 at 11:17
  • It seems as though the issue is that some of these HTC phones do not follow the android documentation that states (for the `degrees` parameter of `onOrientationChanged`: `degrees` is the angle to be rotated clockwise in degrees. The supported angles are 0, 90, 180, and 270 degrees. I have tested all of these angles and it is apparent that these HTC phones are rotating counterclockwise. Maybe this is not at all what you are experiencing though... – Daniel Smith Feb 07 '13 at 11:51
  • It actually isn't clear to me that we are having the same issue now that I took a closer look at your question. I'll put my thoughts into another question. – Daniel Smith Feb 07 '13 at 20:42
  • my question can be found here, it might be related: http://stackoverflow.com/questions/14763204/setorientationhint-rotates-video-counterclockwise-on-some-phones-front-facing-c – Daniel Smith Feb 09 '13 at 02:13
  • Its actually the same issue I am having. When using setOrientationHint: The Droid Incredible writes the orientation metadata and does not rotate the video (this is the correct way), the Droid Incredible 2 and EVO Design 4G does rotate the video 90 degrees regardless of the value specified and does not write the orientation metadata, the EVO 4G rotates the video by the value specified and does not write the orientation metadata. My only solution is to not write the metadata in for HTC phones and rotate them at the server. HTC is consistent in the orientation of the videos when recorded. – haupman Feb 09 '13 at 19:46
  • The Incredible and Incredible 2 video players do not respect the orientation metadata so those videos will play sideways. The Evo Design 4G and Evo 4G both respect the metadata and will rotate the videos as needed. – haupman Feb 09 '13 at 20:00

1 Answers1

0

In my experience, there's nothing you can do to unify all devices. Some devices add metadata, some rotate the byte array, and some dismiss it altogether.

Another problem you have with metadata is that just as the recording devices differ, so do the playback devices, in Windows for example you might have noticed that jpeg metadata (EXIF) is ignored and all images are displayed landscape.

I would have hoped by now that the hardware manufacturers would have had certain hoops to jump through with regards to camera hardware but it seems that this is still a problem.

the.Doc
  • 867
  • 9
  • 17