I hate movies recorded on phone in vertical position. This just short tip how I dealt with with it last time:
for m in *.mp4
do
avconv -i $m -vf "transpose=1" -codec:a copy -codec:v libx264 -preset slow -crf 23 rotated-$m
done
Other examples:
http://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg
http://superuser.com/questions/578321/how-to-flip-a-video-180 °-vertical-upside-down-with-ffmpeg