Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Art & Graphic Design > Resize video height by cropping pixels...

Resize video height by cropping pixels...
Thread Tools
SuperHard
Forum Regular
Join Date: Mar 2001
Status: Offline
Reply With Quote
May 8, 2005, 09:08 PM
 
I captured a short video clip using my digital camera, only a minute long, which I thought I could put in iMovie. However, I made a simple but regrettable error and learned some monumental things in trying to use the clip in iMovie. First of all, since I was using a digital camera (Nikon 5400) the video is captured at 640x480. But since I held the camera in "portrait" orientation, the video played back sideways (i.e. rotated 90degrees). Using QT Pro, I rotated the image 90 degrees, so it was oriented properly, but it was 480 pixels wide and 640 pixels tall.

iMovie handles dv footage which is 720 x 480 pixels. So when I added my clip to iMovie two things happened: it was stretched along its width from 480 to 720 pixels and it was compressed along its height from 640 to 480. My friend in the clip was bloated and squashed!

To fix the stetching problem I figured out how to create a mask (i.e. black bars on the side) to make up the missing 240 pixels along the width, which solved the stretching problem and that was pretty easy using QT Pro. But I couldn't figure out how to reduce the height without squashing the image. What I really wanted to do was just crop the video at 480 pixels tall; remove a bit off the top and a bit off the bottom.

But how do you do that???

I did many searches, but found nothing. I discovered QT Pro can export the video as a series of images (very cool trick). Then I used Photoshop to crop each image (using a Batch process which I learned about today too! Automated actions...wow). Then I used QT Pro (again....) to make a movie from the folder of cropped images and then I exported it as a .dv file.
Finally, I put this clip in iMovie and no one is squashed, stretched, or transformed in any way.

But I'd love to know... Is there a better way to crop the height of a video clip? It seems there has to be.

Many Thanks!
(of course, that should be the last time I ever hold the camera in the wrong orientation...geez).
     
Uncle Skeleton
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status: Offline
Reply With Quote
May 9, 2005, 01:32 AM
 
what you were looking for is ironically called "mask" in QT Pro. In the Mask pane of the Video track in Movie Properites, choose an image with black where you want cropped and white everywhere else (or vice versa, I always forget).
     
bmedina
Mac Elite
Join Date: Jan 2000
Location: Seattle, WA, King
Status: Offline
Reply With Quote
May 9, 2005, 02:04 AM
 
You can just change the dispaly aspect ratio of the final movie. In Quicktime Pro, go to Window->Display Movie Properties. Select the video track, and go to the Visual Settings tab. Then adjust the height and width until things look correct.

This method has the benefit of keeping the original resolution of the video, so you won't lose quality by cropping off parts of the image (kind of like anamorphic DVDs work).
     
SuperHard  (op)
Forum Regular
Join Date: Mar 2001
Status: Offline
Reply With Quote
May 9, 2005, 02:23 PM
 
Here's how I understand what you're suggesting and how I think it would work or wouldn't work in some cases.

Uncle Skeleton - I did try the mask. However, this did not crop, rather the video footage is played in whatever black space I provide. If I created a cirlce, my 480x640 video would play in that. No cropping goes on there. The mask worked just fine to add black bars to the sides, since I needed to add pixels to prevent the stretching. But then it compressed my 640 pixel tall footage to fit in a mask of 480 high which gave me squashed people.

bmedina - I could have done that but with a sacrifice. My video footage was captured at 3:4 (b/c I held the camera at a right angle). To keep it at 3:4, but only 480 tall, then the width would have to be 360 - it would look right, but much smaller than the original), the footage would become very narrow. I maintained the highest resolution by keeping all 480 pixels of width and then cutting off the top and bottom 80pixel-high bars. So in the end, my footage was changed to 480x480, but the aspect was not changed since I cropped the excess. By adding bars to side the final size was 640x480, so that it looks "normal" on a TV.

Thanks again!
     
Jacke
Grizzled Veteran
Join Date: Dec 2000
Location: Finland
Status: Offline
Reply With Quote
May 9, 2005, 04:03 PM
 
Originally Posted by SuperHard
Uncle Skeleton - I did try the mask. However, this did not crop, rather the video footage is played in whatever black space I provide. If I created a cirlce, my 480x640 video would play in that. No cropping goes on there. The mask worked just fine to add black bars to the sides, since I needed to add pixels to prevent the stretching. But then it compressed my 640 pixel tall footage to fit in a mask of 480 high which gave me squashed people.
The mask feature displays what is on black and omits what is on white.

Your video is 480x640. Export a frame to image from QT Pro and open it in an image editor. Select what you want to show and paint it black, then select what you want not to show and paint it white. Save and use it as mask.
In your case if you want to have video height to 480 you paint the top and bottom 80 pixels white and the rest black. This will cause your video to have the proportions of 480x480. If you want black bars on the sides, you increase the image size of the mask to 640x640 and paint top and bottom 80 pixels white.
     
SuperHard  (op)
Forum Regular
Join Date: Mar 2001
Status: Offline
Reply With Quote
May 9, 2005, 10:20 PM
 
Ahhaaa!

Thanks for all your replies. I didn't understand the difference between adding a "mask" and adding an image to video track via "Add to Selection and Scale." I now know when to use each. What really had me confused is I didn't realize the mask needed to be the same size as the video frame. Of course you say, but I was trying to create masks that were of the final desired size - with a black box for the video to show through. That just led to endless frustration.

What took me a couple of hours the other day I can now do in a minute or two!

Many thanks to you guys (and gals?) and thanks for getting me to understand.

Cheers!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:41 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,