browser rotates video 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):

&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;


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?
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