Friday, July 22, 2011

Video editing on the command line

A client gave me some video clips of their work that they wanted to use in a presentation.
The clips were ok but they were too long and he only had 10 minutes to speak
The quickest way to trim the clips was using the brilliant command line programme ffmpeg.
ffmpeg is like a swiss army knife for video and audio.

This command can be used to trim a video clip without any transcoding
ffmpeg -ss 00:00:00 -t 00:02:45 -i sampleinputvideo.mpg -acodec copy -vcodec copy sampleoutputvideo.mpg

-ss means to start at the timepoint indicated (hh:mm:ss), which in this example is at the beginning, or 00:00:00

-t means to process this much of the sampleinputvideo (in hh:mm:ss), which in this example is 2 minutes 45 secs of video.


The command line is so powerful one you learn to love it.

No comments:

Post a Comment