0

I have an input.mov video file recorded by an iPhone 12 mini. I copied the video to my Windows 10 laptop. When I open the on video on my Windows 10 laptop with VLC, the video plays in portrait mode. I ran the following lossless exiftool command:

exiftool -rotation=0 input.mov

and now the input.mov video file plays in landscape mode with VLC. Why? I thought -rotation=0 would do nothing.

4
  • Probably because it had a 90 / 270 degree of rotation?
    – Tom Yan
    Commented Nov 6, 2023 at 2:20
  • @TomYan thanks, I see, -rotation=0 is a directly metadata value and not an action value? In other words, running exiftool -rotation=x input.mov several times is the same as running exiftool -rotation=x input.mov once, regardless of the value of x. Commented Nov 6, 2023 at 2:23
  • Not sure, but IMHO that would be the only case that makes sense, since you are really just modifying some metadata.
    – Tom Yan
    Commented Nov 6, 2023 at 2:39
  • @TomYan I thought that exiftool -rotation=x input.mov would add x to the rotation value in the metadata, but given the results, you must be right. Commented Nov 6, 2023 at 3:03

1 Answer 1

1

You already discovered the truth, but let's register it.

Normally, exiftool just sets some metadata flags. -rotation (just like Orientation for photos) defines the desired rotation/orientation. It is not a command 'rotate'.

Evidently, your video had a non-zero rotation flag, and your player respected it. On the phone videos, this flag is often set incorrectly, especially when recording was started in one orientation and then changed (rotating the display deliberately has a significant delay).

Exiftool can make a 'change' action, but this usually requires an extra effort/syntax. For some tags (like dates), it can simply be += or -= instead of =; but for -rotation the author suggests

exiftool "-rotation<${rotation;$_ += 90}" input.mov

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .