<p>FFmpeg, by default, autorotates videos if a rotation tag is detected. The output video will be oriented upright and have no rotation tag. During processing, this step happens before any filtering is done.</p>

<p>So, in this case, you can simply run</p>

<pre><code>ffmpeg -i 20180115_111730.mp4 -r 30 -acodec copy 20180115_111730_2.mp4
</code></pre>

<p>Alternatively, to perform manual rotation, you can suppress auto-rotation</p>

<pre><code>ffmpeg -noautorotate -i 20180115_111730.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180115_111730_2.mp4
</code></pre>

CC BY-SA 3.0
2018-01-22T05:01:22.127Z
2018-01-22T05:01:22.127Z
Gyan
<p>I have 2 similar videos created on the same mobile. The first one can be downloaded <a href="https://drive.google.com/open?id=1vppsp6GUObZ5Tdt_UZkVkTZROu1m2rQH" rel="nofollow noreferrer" title="here">here</a>.
If I'm using the following command the result is correctly rotated by 90 degrees:</p>

<pre><code>ffmpeg -i 20180114_193135.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180114_193135_2.mp4
</code></pre>

<p>But if I'm using the same command for the <a href="https://drive.google.com/open?id=1ClNlsDPYvkPKXuqY_qsm9u2HAOOBLfww" rel="nofollow noreferrer">second video</a> it is rotated by 180 degrees instead 90:</p>

<pre><code>ffmpeg -i 20180115_111730.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180115_111730_2.mp4
</code></pre>

<p>Can somebody explain, why? I can not rotate the second video with ffmpeg.</p>

<ffmpeg><mp4><transcoding>
ffmpeg transpose=clock rotates 180 degrees instead 90
Tibor Nagy
# ffmpeg transpose=clock rotates 180 degrees instead 90

(Asked by: username_0 on 2018-01-21)

I have 2 similar videos created on the same mobile. The first one can be downloaded here.
If I'm using the following command the result is correctly rotated by 90 degrees:
ffmpeg -i 20180114_193135.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180114_193135_2.mp4

But if I'm using the same command for the second video it is rotated by 180 degrees instead 90:
ffmpeg -i 20180115_111730.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180115_111730_2.mp4

Can somebody explain, why? I can not rotate the second video with ffmpeg.

**Tags:** ffmpeg, mp4, transcoding


---

## 1 answers

### Answer by username_1 on 2018-01-22. Score: 4 | Accepted answer

FFmpeg, by default, autorotates videos if a rotation tag is detected. The output video will be oriented upright and have no rotation tag. During processing, this step happens before any filtering is done.
So, in this case, you can simply run
ffmpeg -i 20180115_111730.mp4 -r 30 -acodec copy 20180115_111730_2.mp4

Alternatively, to perform manual rotation, you can suppress auto-rotation
ffmpeg -noautorotate -i 20180115_111730.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180115_111730_2.mp4


---

