Use mencoder to make videos in slow motion

Use mencoder to make videos in slow motion
Making a video in slow motion is actually nothing special since there are plenty of video editing tools with a lot of cool features for you to use. However, if you just want to create a short video in slow motion to upload it to youtube, you can run a simple command in the terminal with the help of mencoder.

Mencoder is a command line video decoding, encoding and filtering tool and it can convert every format that can be run in MPlayer. To use mencoder, you will need to install it first. In Ubuntu and other Debian-based distro, the command to install mencoder will be:
 sudo apt-get install mencoder  

To use mencoder to convert a video into slow motion, the command will be:
 mencoder -speed 1/4 input.avi -ovc copy -nosound -o output.flv  

In this command, "-speed 1/4" is the parameter to determine the speed of the output video. If you want to have the output in faster motion, change 1/4 into another number that is greater than 1. But when converting to faster motion, the video quality is not really good.

"-ovc copy" means frame copy for video encoder. To know more about the options for video encoder, you can run this command:
 mencoder -ovc help  

"-nosound" is to turn off the sound in the output video because after you change the video speed, the sound speed will be changed too.That's why I prefer no sound over a prolonged sound. But if you want to have sound, you can use "-oac" with an option for audio encoder. To know more about the option of audio encoder, you can run
 mencoder -oac help  

"-o" is for the output video. The format of the output video doesnt need to be similar to that of the input video. You can pick any format you want as long as this video format can be run in MPlayer.

Here is an example of how it works. This is a funny video of a football fail:

And here is this vid in slow motion, I reduced the speed by a factor of 3 here:

linux tips and tricks