Extract video clip using Ffmpeg


I recently needed to extract a 30 second video clip, and remove the audio, from a 2 hour mkv video.  The easiest way was to use the command line tool ffmpeg as follows:

ffmpeg -ss HH:MM:SS.FFF -i movie.mkv -t 00:30 -qscale 0 -an out.mp4

Where HH:MMSS:FFF was the starting time code (in my case it was 2 hours, 8 minutes and 3 seconds or 02:08:03.000 into the video).

The other setting explained:

-i movie.mkv was the input video

-t 00:30 was the duration that I wanted to extract

-qscale 0 was to preserve the video quality

-an was to remove the audio

Of course it being ffmpeg you can use an input movie in a variety of different formats it just so happened mine was an mkv

Leave a comment