Print Shortlink

Rotate iPhone video and convert to h.264 video

First things first: grab the required packages for the program avconv. For Ubuntu, these packages are libavcodec-extra-xx (where xx is a version number) and libav-tools.

For single file, run: avconv -i in.MOV -c:a copy -c:v libx264 -crf 18 -preset veryfast -vf transpose=1 out.mkv, where in.MOV and out.mkv are the input and output files, respectively.

To convert all files in a folder, run:

find . -name “*.MOV” -exec avconv -i ‘{}’ -c:a copy -c:v libx264 -crf 18 -preset veryfast -vf transpose=1 ‘./{}.mkv’ \; && rename “s/.MOV.mkv/.mkv/” * &

Leave a Reply

You must be logged in to post a comment.