Answers.Body: <p>Although <code>noautorotate</code> stops FFmpeg from rotating the video, it does not remove the rotation tag from the output. So, you have to set the tag manually.</p>
  
  <pre><code>ffmpeg -noautorotate -i $vid .....  -metadata:s:v rotate=0 output.mp4 
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-16T02:16:01.230Z
Answers.LastActivityDate: 2016-09-16T02:16:01.230Z
Answers.UserDisplayName: Gyan
Body: <p>I use <code>ffmpeg</code> to convert a <code>3gp</code> video to <code>MP4</code>. You can see a part of output of <code>ffmpeg</code> here:</p>
  
  <pre><code>ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers
  </code></pre>
  
  <p>...</p>
  
  <pre><code>Input #0, 
  
  ...
      Metadata:
        rotate          : 90
        creation_time   : ...
        handler_name    : VideoHandle
        encoder         :                                
      Side data:
        displaymatrix: rotation of -90.00 degrees
      ...
  </code></pre>
  
  <p>I use <code>noautorotate</code> option in below command to avoid auto rotate based on metadata of file and it is successful:</p>
  
  <blockquote>
    <p>ffmpeg -noautorotate -i $vid -qscale 0 -acodec libmp3lame -ar 44100 -ab 128k ../MP4/$(basename $vid).mp4</p>
  </blockquote>
  
  <p>Then I tried this HTML code to open converted file in a browser(for example by <code>Google Chrome</code>):</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;video width="320" height="240" controls&gt;
    &lt;source src="../videos/test.mp4" type="video/mp4"&gt;
  &lt;/video&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But when I open that, video shown rotated. How I can solve this problem? Is there a tag or any other thing to disable autorotate in HTML?</p>
  
Tags: <ffmpeg>
Title: browser rotates video
UserDisplayName: hasanghaforian
ThreadText: # browser rotates video
  
  (Asked by: username_0 on 2016-09-15)
  
  I use `ffmpeg` to convert a `3gp` video to `MP4`. You can see a part of output of `ffmpeg` here:
  
  ```
  ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers
  
  ```
  
  ...
  
  ```
  Input #0, 
  
  ...
      Metadata:
        rotate          : 90
        creation_time   : ...
        handler_name    : VideoHandle
        encoder         :                                
      Side data:
        displaymatrix: rotation of -90.00 degrees
      ...
  
  ```
  
  I use `noautorotate` option in below command to avoid auto rotate based on metadata of file and it is successful:
  
  > ffmpeg -noautorotate -i $vid -qscale 0 -acodec libmp3lame -ar 44100 -ab 128k ../MP4/$(basename $vid).mp4
  
  Then I tried this HTML code to open converted file in a browser(for example by `Google Chrome`):
  
  ```
  <!DOCTYPE html>
  <html>
  <body>
  
  <video width="320" height="240" controls>
    <source src="../videos/test.mp4" type="video/mp4">
  </video>
  
  </body>
  </html>
  
  ```
  
  But when I open that, video shown rotated. How I can solve this problem? Is there a tag or any other thing to disable autorotate in HTML?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-09-16. Score: 2 | Accepted answer
  
  Although `noautorotate` stops FFmpeg from rotating the video, it does not remove the rotation tag from the output. So, you have to set the tag manually.
  
  ```
  ffmpeg -noautorotate -i $vid .....  -metadata:s:v rotate=0 output.mp4 
  
  ```
  
  
  ---
  
  