

Or all at once: exiftool -Rotation -ImageWidth -ImageHeight h1920_w1080_f30_a9-16_r90.mp4 You can pass them individually: exiftool -Rotation h1920_w1080_f30_a9-16_r90.mp4 We only need to retrieve the rotation and the dimensions, so we can pass the -Rotation, -ImageWidth and -ImageHeight options. This command will return all metadata from the video file. Get rotated video metadata using ExifTool exiftool h1920_w1080_f30_a9-16_r90.mp4 We prepared a few sample videos if you want to experiment using different video rotations - please check the Test Media repository for free to use samples.įor this article we used the h1920_w1080_f30_a9-16_r90.mp4 video, which was shot using a Samsung S9 Android device in vertical, portrait orientation.įirst let's take a look at the metadata of the video we want to fix. ExifTool is a free and open-source program for reading and modifying metadata and exif information. This guide covers Windows, Mac and Linux distributions - the apps we'll use are platform independent.įFmpeg is the leading multimedia framework used to manipulate and transform video files easily. This tutorial will show you how to use FFmpeg to rotate videos and get the right orientation, width and height with just a couple of commands. However, it's not only the rotation that needs to be fixed, it's also the width and height of the video that needs to be adjusted as these can also be he wrong way round. It has 4 possible values (0, 90, 180 and 270) and it stores how the device was held when starting the recording: In this article we'll focus on the rotation - it represents the orientation of the device.

Videos and images created by mobile devices including iPhones and Android phones contain a lot of metadata like GPS position, device make and model, fps, rotation and many others. Video rotation is one tricky, but simple issue to overcome and in this guide we will show you how to fix rotated videos using FFMpeg.


This might also happen if you start recording in one orientation and then rotate the smartphone before the device has a chance to update it's orientation settings. Depending on the software or app you're using to edit, preview or share, the videos might appear rotated or even upside down. Quite often, when using a smartphone, we shoot videos in portrait mode, also known as vertical video, or even rotated 180 degrees.
