leo charre


copy part of movie

I wanted to cut a chunk of footage from a video file.
Mencoder does this wonderfully, but, the command is not intuitive.

First, the example. This command goes to 10 minutes after the movie starts and takes 30 seconds after and spits out to ‘out.avi’..

mencoder ./filein.avi -ss 00:10:00 -endpos 00:00:30 -o ./out.avi

More practical example:

Fire up a terminal emulator.. open your source movie with mplayer.
You’ll need to see where in the movie you are, press ‘o’, get a pen and paper. This tells you the time elapsed.
You want to start your video selection at 00:14:24, that is, 14 minutes, 24 seconds.
And you want to stop at 00:15:24.
What you need to figure out is how much time there is betwen the start time and the stop time, in this case, one minute.

So our -ss seek/start time, will be 00:14:24
Once the movie is being copied, the end position (inside the copy movie) will be 00:01:00 (one minute).

Let’s put the command together..

mencoder ./in.avi -ss 00:14:24 -endpos 00:01:00 -o ./out.avi

Wait! Where is the stop time of 00:15:24?? RTFM, remember? endpos is telling mencoder where to stop, this is the target duration of the output movie we are making.


Linux User