Suggestions for cutting/clipping videos on Mac OS X (iMovie produces very large files)?
Solution 1:
I ended up using ffmpeg from the command-line to do the needful clipping.
After doing some research on this site and trying a few simpler commands I came up with the following command:
ffmpeg -ss 00:01:00 -i input.mp4 -ss 00:02:00 -c copy -to 00:05:10 \
output.mp4
As I understand it, with this command ffmpeg basically copies a portion of the clip from input.mp4 to output.mp4 (no re-encoding). ffmpeg seeks fast to the 1 min mark (the first -ss 00:01:00
), then starts looking for key frames, and outputs a clip from 3 mins into the clip (given by the second -ss
option) to 6 mins & 10 secs into the clip (specified by -to 00:05:10
). So this outputs a 3 min 10 sec long clip (5:10 - 2:00).
NOTE: times given by the 2nd -ss
option and the -to
option are relative to the time given by the first -ss
option.
To learn more about these and other options see the excellent answers to the question Using ffmpeg to cut up video.
This method was surprisingly fast (10-15 secs) but for the first 2-3 seconds of the clip the sound would be fine but without any correponding video. Both sound and video quality seemed indistinguishable from the original after those initial 2-3 seconds.
Dropping the -c copy
part solved that problem too. This does mean that video will be re-encoded — which takes longer (my late-2011 13" MacBook Pro took 80-90% of the runtime of the clip) — but audio and video quality were superb and file size was smaller than the original (calculated in terms of MB/min of playback)!
So the final command I settled on was:
ffmpeg -ss 00:01:00 -i input.mp4 -ss 00:02:00 -to 00:05:10 -strict -2 \
output.mp4
The -strict -2
part was added to the command based on suggestion from ffmpeg, as support for X.264 encoding is still experimental,
To use ffmpeg I downloaded the pre-compiled ffmpeg from ffmpegmac.net, put it in a directory that I already knew to be on my PATH
and was ready to go!
Solution 2:
Quicktime's Split
and Trim
functions can be used to quickly pare a video clip down to size.
If all segments are from the same file, Quicktime can easily be used to split, re-arrange, and trim clips:
Open the original in Quicktime, cue ahead at least one frame to the spot of your first cut, and under the Edit
menu, Split Clip
will be un-greyed. Cmd-Y is the shortcut. QTs control panel will switch to a clip-view mode, showing two additional clips with a division at the playhead's current spot, both clips highlighted in yellow. To delete an unwanted clip after a Split Clip
operation, click on the clip in the timeline to highlight it, and hit Backspace, or select one of the functions commonly found under the Edit
menu. In the "Clip View" mode, clips can be dragged and dropped to re-arrange their order. Once finished splitting clips, click the Done
button on the right to resume normal QT operation.
Moving on, it's now time to either Save
the file in its current format, Export
the file in a different resolution, or Share
the file with one of the services. The latter two are under the File
menu, but Save
is conspicuously missing: No worries... Just click the edited clip's window red X in the upper left corner to close the window. This will bring up the familiar Save
dialog box, and A/V files I've saved this way have kept all the properties of the original clip intact. Exporting
or Sharing
is more likely to cause the video to be resampled, and possibly grow in size as yours did.