Using FFMPEG to generate video clips

Using FFMPEG to generate video clips

I use a Pentax K-7 as my main camera these days. Apart from shooting 14MP stills, it shoots high-definiton videos. Sometimes I need to generate shorter clips from the original files, and once again FFMPEG comes to the rescue with this easy command:

ffmpeg -i original.avi -ss 0 -t 5 -vcodec copy -acodec copy clip.avi

The key components here are the -ss and -t parameters, which express in seconds the start point and end point of the clip to extract from the original. Once I run the above command on the original.avi file, the new clip.avi file will be created which will contain the first 5 seconds of the original.avi file.

John Collins

I have been writing about web technology and software development since 2001. I am the developer of the Alpha Framework for PHP, and the five.today personal productivity app. I love open source, technology, and economics.

Pentax K-5 Reviewed

Installing Memcached on Fedora 8

PENTAX K-7 Introduction