Answers.Body: <h1>Rotate without re-encoding</h1>
  
  <p>You can add rotation metadata:</p>
  
  <pre><code>ffmpeg -i input.3gp -c copy -metadata:s:v rotate=90 output.3gp
  </code></pre>
  
  <ul>
  <li><p><code>-c copy</code> will enable <a href="https://ffmpeg.org/ffmpeg.html#Stream-copy" rel="noreferrer">stream copy</a> mode, so it will just re-mux instead of re-encode.</p></li>
  <li><p>Player and device support for the <code>rotate</code> metadata may vary, so your player or device may not actually rotate the video. If that is the case you may have to manually rotate within the player, or re-encode.</p></li>
  </ul>
  
  <h1>Rotate with re-encoding</h1>
  
  <p>When re-encoding <code>ffmpeg</code> will automatically rotate the video. The rotate metadata/sidedata will not be copied from the input (which is a good thing).</p>
  
  <pre><code>ffmpeg -i input output
  </code></pre>
  
  <p>If it doesn't work for you then your build is too old. Refer to the <a href="https://ffmpeg.org/download.html" rel="noreferrer">FFmpeg Download</a> page.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-13T19:01:53.523Z
Answers.Text: Any idea why rotating 90 deg does 180, and rotating 360 does 90? haha
Answers.UserDisplayName: JorgeeFG
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-06T17:33:54.363Z
Answers.LastActivityDate: 2015-09-07T07:16:31.537Z
Answers.LastEditDate: 2015-09-07T07:16:31.537Z
Answers.UserDisplayName: llogan
Body: <p>I created a video in my cellphone holding the phone in portrait mode. The video is 720p and it looks perfectly fine in cell phone. I copied it on computer and when viewing it, the video looks 90 degrees anti-clockwise rotated. It is confusing for me that why it happened. How can I rotate the copied video back to 90-degrees without re-enconding the video.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-04T16:48:31.257Z
Comments.Text: It has been answered to death already. Not possible, unless container supports it or you are using MJPEG codec, which you are not.
Comments.UserDisplayName: v010dya
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-04T16:53:48.067Z
Comments.Text: @Volodya ok, deleted my answer, but might be better suggest a duplicate instead of downvoting it.
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-04T16:56:11.493Z
Comments.Text: @poor I've clicked downvote on your answer by some weird accident. Tried to undo, but it didn't let me.
Comments.UserDisplayName: v010dya
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-04T17:04:30.533Z
Comments.Text: @Volodya this is the only one I've found here: http://video.stackexchange.com/questions/15013/avconv-rotating-mpeg4-video-loses-quality/15021#15021 and I don't think this is a duplicate.
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-04T17:17:33.897Z
Comments.Text: @poor Ok, i now feel dumb. There were several questions, some of which have provided a very in depth explanations on how to rotate mjpeg via bash scripts and imagic. It really feels like somebody has gone on a cleaning spree and has removed too much. Alternatively i've dreamt all those questions. I'm trying to find them now on other SE.
Comments.UserDisplayName: v010dya
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-04T17:26:01.270Z
Comments.Text: @Volodya I think only equal questions are **real duplicates** (avconv rotation is not equal to _How to rotate my 3gp video_), but we could post a meta, if you are interested and also suggest a duplicate if you find one. I've undelete my answer, just to have an answer for this question, see the statistics: http://area51.stackexchange.com/proposals/4/audio-video-production.
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-20T09:19:08.660Z
Comments.Text: Apparently my answer doesn't solve your issue. Please let us know, what else you need or edit your question.
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-06T17:34:20.143Z
Comments.Text: @poor Yet another drive-by-question.
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-07T06:53:10.813Z
Comments.Text: @LordNeckbeard Haha - a **drive-by-question** ;) Made my day. Upvoted your answer to prevent that this question comes over and over again... Thanks.
Comments.UserDisplayName: p2or
Tags: <encoding>
Title: how to Rotate a 3gp video without re-encoding
UserDisplayName: user1451111
ThreadText: # how to Rotate a 3gp video without re-encoding
  
  (Asked by: username_0 on 2015-05-04)
  
  I created a video in my cellphone holding the phone in portrait mode. The video is 720p and it looks perfectly fine in cell phone. I copied it on computer and when viewing it, the video looks 90 degrees anti-clockwise rotated. It is confusing for me that why it happened. How can I rotate the copied video back to 90-degrees without re-enconding the video.
  
  **Tags:** encoding
  
  > **Comments:**
  > **username_1**: It has been answered to death already. Not possible, unless container supports it or you are using MJPEG codec, which you are not.  
  > **username_2**: @Volodya ok, deleted my answer, but might be better suggest a duplicate instead of downvoting it.  
  > **username_1**: @poor I've clicked downvote on your answer by some weird accident. Tried to undo, but it didn't let me.  
  > **username_2**: @Volodya this is the only one I've found here: http://video.stackexchange.com/questions/15013/avconv-rotating-mpeg4-video-loses-quality/15021#15021 and I don't think this is a duplicate.  
  > **username_1**: @poor Ok, i now feel dumb. There were several questions, some of which have provided a very in depth explanations on how to rotate mjpeg via bash scripts and imagic. It really feels like somebody has gone on a cleaning spree and has removed too much. Alternatively i've dreamt all those questions. I'm trying to find them now on other SE.  
  > **username_2**: @Volodya I think only equal questions are **real duplicates** (avconv rotation is not equal to _How to rotate my 3gp video_), but we could post a meta, if you are interested and also suggest a duplicate if you find one. I've undelete my answer, just to have an answer for this question, see the statistics: http://area51.stackexchange.com/proposals/4/audio-video-production.  
  > **username_2**: Apparently my answer doesn't solve your issue. Please let us know, what else you need or edit your question.  
  > **username_3**: @poor Yet another drive-by-question.  
  > **username_2**: @LordNeckbeard Haha - a **drive-by-question** ;) Made my day. Upvoted your answer to prevent that this question comes over and over again... Thanks.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2015-09-06. Score: 6
  
  # Rotate without re-encoding
  
  You can add rotation metadata:
  
  ```
  ffmpeg -i input.3gp -c copy -metadata:s:v rotate=90 output.3gp
  
  ```
  
  * `-c copy` will enable [stream copy](https://ffmpeg.org/ffmpeg.html#Stream-copy) mode, so it will just re-mux instead of re-encode.
  * Player and device support for the `rotate` metadata may vary, so your player or device may not actually rotate the video. If that is the case you may have to manually rotate within the player, or re-encode.
  
  # Rotate with re-encoding
  
  When re-encoding `ffmpeg` will automatically rotate the video. The rotate metadata/sidedata will not be copied from the input (which is a good thing).
  
  ```
  ffmpeg -i input output
  
  ```
  
  If it doesn't work for you then your build is too old. Refer to the [FFmpeg Download](https://ffmpeg.org/download.html) page.
  
  > **Comments:**
  > **username_4**: Any idea why rotating 90 deg does 180, and rotating 360 does 90? haha  
  
  ---
  
  