Video Clip extraction

  1. Open a Command Prompt (Terminal for Mac)
  2. Change to directory with video file with command: cd "c:\your\folder\path\here" (cd /your/folder/path/here for Mac)
  3. Type this command (with red text modified for your situation)
ffmpeg -ss [start_seconds] -t [duration_seconds] -b 8000K -i INVIDEO.MP4 OUTVIDEO.MP4

Tip: open up Notepad, Word or your favorite text editor and copy/paste this command into a blank sheet. You can edit it there to fit your needs, then copy/paste it into the Command Prompt/Terminal.

Explanation

-ss position
Start 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
-b bitrate
Sets the output video bit rate. This can be increased if the output video quality is not sufficient, or decreased to save space.

Examples

I have a 30 second PLAX ultrasound done by a resident (plax.mov). I want to extract a 6 second clip from this file, starting 12 seconds in. I will use the following command:
ffmpeg -ss 12 -t 6 -b 8000K -i plax.mov plax_clipped.mov

I have a 90 second FAST ultrasound done by a resident (fast.avi). I want to extract a 10 second clip from this file, starting 75 seconds in. I will use the following command:
ffmpeg -ss 75 -t 10 -b 8000K -i fast.avi fast_clipped.avi
alternately, I could use this format to get the same result:
ffmpeg -ss 00:01:15 -t 00:00:10 -b 8000K -i fast.avi fast_clipped.avi

You can combine this with cropping by adding the cropping flag, read more here. Lets say I have a 15 second GB ultrasound done by a resident (GB.mov). I want to extract a 3 second clip from this file starting at 10 seconds, cropping off top 28 pixels of patient info. I will use the following command:
ffmpeg -ss 10 -t 3 -b 8000K -vf crop=in_w:in_h-28:0:28 -i GB.mov GB_clip_crop.mov