Monday, March 21, 2011

How To Crop A QuickTime Movie

Cropping a QuickTime Movie is a hassle; but there are some ways to go about it to make it slightly less hassleful. (yes, I just made up that word)

A: Use an image editing program to make a mask.

1. Open the movie file in QuickTime and hit Command + C to Copy it. (You're actually just copying a frame)
2. Launch your image editor and paste in the clipboard's contents (the frame of your video file) into a new document. Make sure the document size is the same size as the image you just pasted.
3. Using the Selection, Paint Bucket, Fill or whatever tools you have available make the part of the video you want solid black. Make the part of the video you want to crop (to go away) solid white.
4. Save out your image as a .jpg or .gif or whatever format you like.
5. Open the movie to be cropped in QuickTime 7 if it's not already, and then hit Command + J for "Show Movie Properties".
6. Click "Video Track" in the top portion of the window.
7. Click "Visual Settings" in the lower portion.
8. Under "Mask" on the left hit the "Choose…" button. (or, even easier, drag your mask image file into the Well here.
9. You'll INSTANTLY see your opened QuickTime movie crop to the mask.
10. Notice that both the Movie Properties and QuickTime Player windows have "unsaved" dots in the close widget. Close the Movie Properties window.
11. Export away.

B: Use MPEG Streamclip.

1. Download and install the FREE program MPEG Streamclip if you don't have it already.
2. Open your QuickTime clip in MPEG Streamclip.
3. Hit Command + E for "Export to Quicktime".
4. At the top of the "Movie Exporter" window that pops up under "Compression" select the codec you want. (yes, you may see ProRes 422 listed twice; no I don't know why. It's likely the bottom one is actually ProRes HQ, but that's just a guess)
5. Monkey with all the rest of the options there if you know what your'e doing. If you don't, don't touch.
6. Near the bottom, above the "Presets…" button Checkmark the "Cropping:" checkbox.
7. At the end of this line you'll see a pulldown. You'll probably want to leave it on "Destination".
8. Now, how the heck do you know what numbers to put into here? Open the SAME QuickTime clip you're cropping in QuickTime 7. Yes, really.
9. Make sure it's full size and then hit this key combo: Command + Shift + 4 which will let you take a screenshot of a portion of the screen. Click-N-Drag out a box that has only what you want the exported QuickTime movie to have. Let go of the mouse. You'll have a screenshot on your desktop.

Note: You can just watch the cursor here to get the numbers right before you let off the mouse but it's up to you.

10. If you didn't memorize the numbers the cursor showed in step 9 before you let off the mouse go and look at the Get Info of the screenshot (on your Desktop) that you just took. Depending on how you have your Finder options set up, you make see the size of the image listed under it or next to it. If you don't, highlight it, tap Command + I for "Get Info" and look for "Dimensions" under "More Info:"

Lets just say it's 604 X 636, for fun.

11. While you have your QuickTime clip opened in QuickTime hit Command + I for "Show Movie Inspector" and jot down the size under the "Format" line. Let's say ours is 830 X 876 to make things interesting.

12. MATH TIME!!!!  Now we can rough in the crop numbers.

For the top to bottom take the actual height and subtract the desired height: 830 - 604 = 226. Now divide (we're distributing it equally) it by 2 and we get 114.

For Top and Bottom in MPEG Streamclip's Cropping line enter 114.

Now for the side to side: 876 - 636 = 240 and divided by 2 that equals 120. Type 120 into both the Left and the Right boxes in MPEG Streamclip.

13. Hit the bottom-left "Preview" button at the bottom.

Is it close? Told you we roughed it in.
Adjust the cropping numbers until you're happy.

In my test my final numbers were:

Top: 114  Left: 120  Bottom: 127  Right 124
instead of:
Top: 114  Left: 120  Bottom: 114  Right 120

Oh, and fee free to monkey with the Center options in this window as well. The Positive Numbers in the first box will move your image to the RIGHTWARDS while Positive Numbers in the second box will move your image DOWNWARDS.

Honestly, I'm not sure why it's off like that but I've used this method to rough it in for a while. I discovered it when I was on a company's Mac that didn't have an image editor at the time and the IT people (Grrr…) REFUSED to allow me to install an image editor to make an image mask with.

Sure there are other ways but they usually involve people mentioning VisualHub which is getting mighty long in the tooth and is totally unsupported now (sniff…) or they're even more convoluted than these two methods. If you have another way you like please pass it along.

QuickTip: Keep a flash drive on in your pocket with Gimp installer (it's FREE) on it but it's not much help if you don't have Admin access to the machine anyway. There are ways around this though.

5 comments:

UI Guy said...

These methods are great! Thanks for posting!

Any idea whether there's any way to do a non-rectangular mask that works with QT10/QuickTime "Player"? I followed your directions and have an awesome irregularly shaped mask that works perfectly in QT7, but it completely disappears when I open it in QTP or import it into iMovie (9.0.2). :(

Walker Ferox said...

I'm not sure. I've not had much success with QTX (10) with much of anything.

You could try exporting that as an .mov in another codec and see if it imports correctly. Maybe ProRes or Animation?

ishttah said...

Thank you for this info. Saved me a lot of time and headache trying to crop an image sequence.

. said...

Thanks Not Bruce. I'm a complete novice to this and only want to fix the narrow iphone videos I have. Worked like a charm.

Sjoerd Op 't Land said...

Thanks Bruce!

One remark when cropping video that already has transparency: to maintain the overlay behaviour, select something else than "None" in the Transparency menu just below the mask ("Composition", for example).