Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 530

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/theme.php on line 623
Niklas blog » Blog Archive » Rotating video clips shot in "portrait" mode (revisited)

Niklas blog

Just another WordPress weblog

Rotating video clips shot in "portrait" mode (revisited)

December 31st, 2007 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Some time ago I write about how to use mencoder to rotate videos. After playing around with mencoder some more today I found a better way of doing it, all in one go.

mencoder -ovc lavc -lavcopts vcodec=mpeg4 -vf-add rotate=1,expand=432:324,scale=640:480 -oac mp3lame -lameopts br=64:mode=3 -srate 22050 input.avi -o output.avi

This will run the video through three filters. The first one rotates, the second one expands and the third one scales. This time I’m expanding to 432×324 which is exactly 4:3.

The reason I’m scaling to 640×480 at the end is that I’m now using SmugMug for all my photos and videos. SmugMug scales the video automatically to 320×240 and 640×480. If the video I upload is smaller than 640×480 it won’t upscale it to 640×480 but will only keep a 320×240 version. The original is always discarded.

The mencoder command line also converts to mpeg4 for the video and mp3 for the audio. This way I don’t have to run the video through ffmpeg to make it work in Windows Media Player. I discovered that that last step seriously lowered the quality of the output.

Comments are closed.