How to make a video clip with avconv / ffmpeg

The following commandline will make a 30 second clip in output.avi, from the file input.avi starting at 2 mins 25.5 seconds:

avconv -i input.avi -ss 00:02:25.500 -t 30 -codec copy output.avi

ffmpeg takes the same arguments if you have that (avconv is just the newer name for ffmpeg)
The -codec copy is important, and should be used as long as you are using the same output and input file type. Without it, the video will be decoded and re-encoded, which may cause a dramatic loss in quality.

I got a lot of warnings about renumbering frames or somesuch, but the output file worked fine.

Leave a Reply

Your email address will not be published. Required fields are marked *