We are often asked to create videos that are meant to be viewed in "tall" mode -- i.e., on a phone help upright. Typically, the original footage was either shot on a smartphone in portrait mode, or else shot using a professional camera positioned sideways, at a 90 degree angle. Too often, the resulting capture ends up stored in the standard 16:9 ratio and format. In many such cases, the first thing we need to do is to rotate the video.
In other (and fewer) words, we receive this:
but what we really need is this:
There are many ways to go about rotating a video source. I'll reserve the preferred method for last.
The first way is to use the built-in functionality of the video editor. Most editors, from popular online platforms such as Canva to desktop non-linear video editors like Kdenlive and Adobe Premiere, include an option to either rotate the source video automatically, or else create a copy of the source video in the correct format. However, relying on the editor to modify the source material is not ideal, as it tends to muddle the workflow and confuse the authors of future iterations (including yourself,)
The second way is to use a free online tool -- such as Kapwing (here) or Clideo (here). While this solution is convenient (as long as you have a fast Internet connection), the process is somewhat cumbersome and not very scalable. Additionally, the processing of high-resolution (4K and 8K) footage, or any clip of significant size or length for that matter, is likely to be limited by what those browser-based tools can reliably handle.
There is a third way, which gets the job done perfectly in just a few seconds. It uses a short command line and ensures that you will retain the source material in your work space.
Use the line below (simply click on it to copy it to your clipboard):
ffmpeg -i source.mov -metadata:s:v rotate="-90" -codec copy target.mp4
Make sure you have the latest version of ffmpeg installed on your computer.