Flip horizontal

I can’t find the flip horizontal filter anywhere. How do I do this?

Use the Rotate or Mirror filter.

1 Like

Hi!
Every video file i upload to the editor is initially shown as a mirror image of the original file.
Any idea why and how to address this issue?

Thx!

Any specific information about the characteristics of those videos?
Which version of Shotcut are you using?
Do you have any filters applied to the output track?
Any additional information may help.

Hi, they are mp4 videos taken on my Samsung phone, I don’t know much about video editing but Shortcut says they are of variable frame rate and offers to fix this (wich i have done) on upload.

Opening the original files in a video player shows them non-flipped.

I’m using v 20.11.28 ona Win 10 PC.

Cheers,

/A

I don’t know why that happens. I can only give you a temporary solution unless other people can guide you better.
In Shotcut you can add the mirror filter to the video clip so that the video is displayed in the correct orientation.
You can apply the effect on one clip or on the whole track (as it appears in the animated GIF)

Are they recorded using the front camera? I think that some phones record mirrored from the front camera. Maybe there is some metadata in the file that indicates that and some players are able to un-mirror the video when playing back.

1 Like

Just a shot in the dark : Maybe you have a Mirror filter on the Output ?

If any filter is applied to the Output, you’ll see this funnel shaped icon:

Nope. However I had to (learn to) use one to correct it. I think Brian probably got it right above.

1 Like

I came across this on the web to stop the mirroring:

Go to camera app and turn on the front camera, hit the cog wheel to bring up settings, tap on save options and then turn off “pictures as previewed”.

This will save the picture as it really looks rather than giving you a mirror image.

Thanks! I assume that you’d agree with Brian above in that some payers can flip the image automatically using meta data?

Cheers,

A

MP4 and Quicktime containers (probably others too) contain in their metadata a “window geometry matrix” shown below. I suspect that you can “mirror-mage” the video horizontally by changing X from 0.0 (left) to 1.0 (right); just as you could mirror-image it vertically by changing Y from 0.0 (top) to 1.0 (bottom)

4 bytes decimal window geometry matrix value A = long fixed point width scale (normal = 1.0)
-> 4 bytes decimal window geometry matrix value B = long fixed point width rotate (normal = 0.0)
-> 4 bytes decimal window geometry matrix value U = long fixed point width angle (normal = 0.0)
-> 4 bytes decimal window geometry matrix value C = long fixed point height rotate (normal = 0.0)
-> 4 bytes decimal window geometry matrix value D = long fixed point height scale (normal = 1.0)
-> 4 bytes decimal window geometry matrix value V = long fixed point height angle (normal = 0.0)
-> 4 bytes decimal window geometry matrix value X = long fixed point positon (left = 0.0)
-> 4 bytes decimal window geometry matrix value Y = long fixed point positon (top = 0.0)
-> 4 bytes decimal window geometry matrix value W = long fixed point divider scale (normal = 1.0)

This was my guess too. There is metadata called “orientation” where the value of 2 means to mirror horizontal. The metadata may have been stripped away during the conversion to edit-friendly.

EDIT: On second thought, it might be the opposite. Maybe ffmpeg applied the orientation flag during decoding to display the video correctly. Then the -map_metadata in the conversion to edit-friendly retained the orientation flag instead of resetting it, making the corrected image mirrored again.