Kim Egede Jakobsen
Kim Egede Jakobsen

Reputation: 145

FFMPEG - Use Orientation metadata for mobile recordings

When I convert a .mov file recorded on a iPhone 4S, the video is rotated 180 degrees. If I playing the video on my computer, it looks correct.

I got the same issue with .3gp files from Android and .mov from iPhone 4 (They are rotated 90 degrees)

I have tried looking in the documentation for FFMPEG, but it seems that I will need to scan the metadata and then add it to my convertion script?

Command tried: ffmpeg -i VID_20120510_104204.mov -y -f flv -ar 44100 VID_20120510_104204.flv Also looked on -vf %ROTATE%

Upvotes: 2

Views: 2503

Answers (1)

Hakan Serce
Hakan Serce

Reputation: 11256

Here is a python script for detecting the rotation angle of a video from the metadata : https://github.com/danielgtaylor/qtrotate/blob/master/qtrotate.py

You can use this with your conversion script.

Upvotes: 4

Related Questions