Cut Video with FFmpeg

Here is a quick command that you can use to cut a piece of video with FFmpeg.

ffmpeg -ss [start_seconds] /
-t [duration_seconds] -i [input_file] [outputfile]

Explanation

-ss position

Seek to given time position in seconds. “hh:mm:ss[.xxx]” syntax is also supported.

-t duration

Set the recording time in seconds. “hh:mm:ss[.xxx]” syntax is also supported.

-i filename

input filename

More Information

I have more information about video formats and codecs, ripping home video from a DVD, a story board sketch template, and more on my Digital Video page.

Thanks to Werner Robitza for pointing out that the -sameq option was used incorrectly on this page. It's a common misconception that the option means “same video quality as source” but that wasn't actually true. The option has now been removed from this page and actually from FFmpeg entirely. Werner also has an informative page on video encoding.


comments powered by Disqus
video/cut_video_with_ffmpeg.txt · Last modified: 2013/05/10 17:18 by Joel Dare