title: Rotate mp4 videos without re-encoding
body: <p>I'm looking for a way to rotate videos shot with my Nexus 4 on my Debian Wheezy sytem. The videos are shot in portrait mode and I would like to rotate them to landscape mode. Preferably the rotation is command-line driven.</p>
  
  <p>I have found several previous questions which are hinting at a good solution but I can't seem to manage to get it working.</p>
  
  <p>To begin with there was this question:
  <a href="https://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg">Rotating videos with FFmpeg</a></p>
  
  <p>But it indicates that ffmpeg is outdated and that I should use avconv. I found this question detailing the way to go forward.
  <a href="https://askubuntu.com/questions/269429/how-can-i-rotate-video-by-180-degrees-with-avconv">https://askubuntu.com/questions/269429/how-can-i-rotate-video-by-180-degrees-with-avconv</a></p>
  
  <p>This made me using following command:</p>
  
  <pre><code>avconv -i original.mp4 -vf "transpose=1" -codec:v libx264 -preset slow -crf 25 -codec:a copy flipped.mp4
  </code></pre>
  
  <p>However, this is painstakingly slow (last test took me more than 6 hours for less than 3 minutes of footage) and does not result in a playable movie. I also get an error in logging output which states Mb Rate > level limit.</p>
  
  <p>Is there an issue here with the re-encoding? Should I first re-encode the videos from my phone to another, more "workable" encoding before applying the rotations? Or am I missing another important point?</p>