Remove Rotation and Flip Metadata from MOV with FFmpeg
This article explains how to strip rotation, orientation, and flip metadata from an MOV video file using FFmpeg. You will learn how to reset the rotation metadata to zero without re-encoding the video, how to strip all metadata globally, and how to physically bake the rotation into the video pixels if you want to remove the metadata while keeping the orientation.
Method 1: Reset Video Rotation Metadata (No Re-encoding)
The fastest way to remove rotation metadata from an MOV file is to reset the video stream’s rotation tag to zero. This method uses stream copying, which means the video is not re-encoded, preserving the original quality and completing the process instantly.
Run the following command in your terminal:
ffmpeg -i input.mov -c copy -metadata:s:v:0 rotate=0 output.movHow it works: * -i input.mov: Specifies
your input video file. * -c copy: Copies both video and
audio streams directly without re-encoding. *
-metadata:s:v:0 rotate=0: Targets the first video stream
(s:v:0) and sets its rotate metadata tag to
0 (effectively stripping any rotation instruction).
Method 2: Strip All Metadata Globally
If you want to strip all metadata entirely—including rotation, camera
details, creation dates, and GPS coordinates—you can use the
-map_metadata flag.
Run the following command:
ffmpeg -i input.mov -map_metadata -1 -c copy output.movHow it works: * -map_metadata -1: Tells
FFmpeg to ignore and exclude all global and stream-level metadata from
the output file.
Note: In some modern containers, rotation is stored as a display matrix side-data rather than a standard metadata tag. If the rotation persists after using the command above, you may need to use Method 3.
Method 3: Bake the Rotation into Pixels (Re-encoding)
If your goal is to make the video play in its current orientation across all devices while removing the metadata tag itself, you must transcode (re-encode) the video. This physically rotates the pixels and sets the metadata rotation to zero.
FFmpeg automatically rotates the video stream based on the metadata source by default when re-encoding. Run this command:
ffmpeg -i input.mov -c:v libx264 -crf 23 -c:a copy output.movIf you need to manually apply a rotation filter (for example, a
90-degree clockwise rotation) and strip the metadata, use the
transpose filter:
ffmpeg -i input.mov -vf "transpose=1" -metadata:s:v:0 rotate=0 -c:a copy output.movTranspose values: * 0: 90 degrees
counter-clockwise and vertical flip. * 1: 90 degrees
clockwise. * 2: 90 degrees counter-clockwise. *
3: 90 degrees clockwise and vertical flip.