Answers.Body: <p>I may not be able to answer this as fully as someone else, but I'd do the following:</p>
  
  <ol>
  <li>Open the video file in (most) any video editor. (something as basic as Windows Movie Maker will suffice)</li>
  <li>Split the clip at the point where the device rotates.</li>
  <li>Rotate the newly-created second clip to suit your needs.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-18T04:49:26.583Z
Answers.LastActivityDate: 2015-06-18T04:49:26.583Z
Answers.UserDisplayName: j.m.g.r
Answers.Body: <p>You have to get Rotation below ways-
  1)MediaMetadataRetriever class  in android.Check below link
  <a href="http://developer.android.com/reference/android/media/MediaMetadataRetriever.html" rel="nofollow">http://developer.android.com/reference/android/media/MediaMetadataRetriever.html</a></p>
  
  <p>This class in Orientation tag supported in Api Level 17(4.2+).</p>
  
  <p>2)
  Another way FFMPEG Metadataretrival library import and get rotation.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-25T12:31:43.320Z
Answers.LastActivityDate: 2015-06-25T12:31:43.320Z
Answers.UserDisplayName: Sanket990
Body: <p>I recorded a video from an android phone and turned it from portrait to landscape within the first 5 seconds.</p>
  
  <p>I noticed if I play the video in Windows Media Player - it shows up portrait then turns to a 90 degree angle on its' side. However in VLC player, it shows up in portrait and when the film rotates, the position stays fixed so the video always looks correct, I guess because VLC reads the meta data of the film for the rotation angle and adjusts automatically during playback ?</p>
  
  <p>However I need to save this into the actual video... so that it "automatically" turns for other players or for YouTube etc.</p>
  
  <p>I have no idea how to do this?</p>
  
  <p>Edit:
  What I mean is that the metadata for current rotation needs to be read and a video saved using this information so that the actual video stays stable when the part in the video where the phone is rotated while filming. Does that make more sense?</p>
  
  <p>Try it out by filming something with your smartphone and then rotate the phone while recording from landscape to portrait or vice versa. Save the video to your PC and play with latest VLC, it stays stable but view in Windows Player and you end up with a rotated video (either it's on the side or something)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-22T19:12:04.023Z
Comments.Text: Can you provide a sample file?
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-26T05:24:10.507Z
Comments.Text: You mean you want to transcode and make a new video that's actually rotated, instead of just having metadata telling players to rotate?  I wouldn't call this "saving" anything into the video.  More like applying the metadata.
Comments.UserDisplayName: Peter Cordes
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-26T05:44:57.357Z
Comments.Text: Ah ok I didn't know the correct terms, thanks :)
Comments.UserDisplayName: dan2k3k4
Tags: <video>
Title: How to save the phone rotation into a video?
UserDisplayName: dan2k3k4
ThreadText: # How to save the phone rotation into a video?
  
  (Asked by: username_0 on 2015-06-17)
  
  I recorded a video from an android phone and turned it from portrait to landscape within the first 5 seconds.
  
  I noticed if I play the video in Windows Media Player - it shows up portrait then turns to a 90 degree angle on its' side. However in VLC player, it shows up in portrait and when the film rotates, the position stays fixed so the video always looks correct, I guess because VLC reads the meta data of the film for the rotation angle and adjusts automatically during playback ?
  
  However I need to save this into the actual video... so that it "automatically" turns for other players or for YouTube etc.
  
  I have no idea how to do this?
  
  Edit:
  What I mean is that the metadata for current rotation needs to be read and a video saved using this information so that the actual video stays stable when the part in the video where the phone is rotated while filming. Does that make more sense?
  
  Try it out by filming something with your smartphone and then rotate the phone while recording from landscape to portrait or vice versa. Save the video to your PC and play with latest VLC, it stays stable but view in Windows Player and you end up with a rotated video (either it's on the side or something)
  
  **Tags:** video
  
  > **Comments:**
  > **username_1**: Can you provide a sample file?  
  > **username_2**: You mean you want to transcode and make a new video that's actually rotated, instead of just having metadata telling players to rotate?  I wouldn't call this "saving" anything into the video.  More like applying the metadata.  
  > **username_0**: Ah ok I didn't know the correct terms, thanks :)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2015-06-18. Score: 3
  
  I may not be able to answer this as fully as someone else, but I'd do the following:
  
  1. Open the video file in (most) any video editor. (something as basic as Windows Movie Maker will suffice)
  2. Split the clip at the point where the device rotates.
  3. Rotate the newly-created second clip to suit your needs.
  
  
  ---
  
  ### Answer by username_4 on 2015-06-25. Score: 0
  
  You have to get Rotation below ways-
  1)MediaMetadataRetriever class in android.Check below link
  <http://developer.android.com/reference/android/media/MediaMetadataRetriever.html>
  
  This class in Orientation tag supported in Api Level 17(4.2+).
  
  2)
  Another way FFMPEG Metadataretrival library import and get rotation.
  
  
  ---
  
  