When I convert .mov files from iPhone 4 and .3gp from Android with FFMPEG.
I need to rotate the video 90 degress, but iPhone 4s needs 180 degress…
Is there any way to fix this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t recall how Android handles this, but iPhones record orientation information in the mov file metadata. Depending on how the camera is held while recording, videos could need 0, 90, 180, or even 270 rotation to play upright after conversion.
As yet, I don’t know of any additions to ffmpeg to parse this metadata, so you have to do it manually usingffprobe -show_streamsor something similar, and then set the rotation appropriately.Update: as kibitzer points out ffmpeg does now detect that the video is rotated, but does not yet provide an automatic rotation fix. Instead, you’ll still have to parse out the rotation information and use a combination of the
transpose,vflip, andhflipvideo filters to correctly rotate the video.