# Rotate movies

DevFeed: [Rotate movies](<https://devfeed.tech/articles/rotate-movies-27631.md>)

Original publisher: [Read original article](<https://gagor.pro/2015/12/rotate-movies/>)

Author: Tom

Published: 2015-12-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [FFmpeg (Fast Forward Moving Picture Experts Group)](<https://devfeed.tech/topics/ffmpeg.md>)

Tags: [examples](<https://devfeed.tech/tags/examples.md>), [ffmpeg](<https://devfeed.tech/tags/ffmpeg.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [linux](<https://devfeed.tech/tags/linux.md>)

## AI overview

A short tutorial showing how to rotate vertically recorded MP4 movies in a shell loop using avconv and the transpose video filter, while copying the audio stream and encoding video with libx264.

## Source excerpt

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 external link http://superuser.com/questions/578321/how-to-flip-a-video-180 external link °-vertical-upside-down-with-ffmpeg