I am running a server application that accepts video uploads from an iOS app. The app uploads a .mov to the server and the server converts it to .mp4 (this is for future Android compatibility). The problem is that the .mov format uses a rotation flag in the metadata that doesn't work very well with the conversion and videos frequently end up in the wrong orientation. The command I'm using,
avconv -i iosvideo.mov -c:v libx264 -b:v 1250k -vf scale=trunc(oh*a/2)*2:480,transpose=1 -metadata:s:v:0 rotate=0 -t 20 -c:a libvo_aacenc -b:a 192k output.mp4
seems to only rotate a fixed amount. How would I go about having avconv read the rotation flag from the .mov and rotate the video stream accordingly?