I recorded a Full HD video with Samsung Galaxy II, when I uploaded it to YouTube I found that it turned to 90 degrees like Portrait layout 1080x1920 NOT 1920x1080. I found the c
In my case changing the exif data did not solve the problem because it is, in fact, correct. The problem is that most players ignore it (i.e. they assume it is 0).
If you do want to play with the Rotation exif tag, you can control it via MediaRecorder.setOrientationHint(). That is much easier than modifying it after the fact. If the YouTube uploader respects the tag, then that's all you need.
But the only solution I have found is to rotate the video itself, or use UI hints to guide users to record the video in the camera's natural 0 orientation.
There's no built-in mechanism for rotating videos in Android.