title: Use FFmpeg to rotate the video based on its <rotate> metadata? Why does Android put the wrong metadata?
body: <p>I have a website where the user uploads a video.<br>
  For my website i have also an Android application.<br>
  The website creates a thumbnail of each uploaded video (from browser or Android).</p>
  
  <p>The problem is that for normal videos it's all OK, but for android my videos are rotated by 90°.</p>
  
  <p>I think that Android has a bug, because when I see with FFmpeg the video's metadata, for a normal recorded video I got a rotate=90 value, and for a 90° rotated video, I don't have anything in the metadata (and the thumbnail is correct).</p>
  
  <p>Why? </p>
  
  <p>This is an image of a <strong>normal</strong> recorded video (with the phone in <strong>portrait mode</strong>).</p>
  
  <p><img src="https://i.stack.imgur.com/yCDJx.png" alt="FFmpeg showing the rotate metadata in a normal recorded video"></p>
  
  <p>Anyway, I have the metadata in the video, can I create its thumbnail based on its metadata's rotate value without extracting the metadata and then use <strong>ffmpeg</strong> to rotate the video on this value?</p>
  
  <p>Thank you in advance.</p>