Avoiding Stretched Video on iPhone

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
maynard123
Posts: 8
Joined: Fri Jul 20, 2007 3:53 am

Avoiding Stretched Video on iPhone

Post by maynard123 »

Hi, noob here. I encoded an anamorphic movie that says it is 2:35:1 on the label, but Handbrake's DVD info window shows it as 1.78:1. I set the width/height destination to 480x320 to match the iPhone resolution, and set it to auto crop, because I don't want any black bars (I'm ok losing the ends of the movie). I'm using the Windows GUI version of Handbrake, and using the iPod H.264 setting.

The resulting movie looks good with no black bars, except it is very stretched...everyone is tall and thin in the film. Is there a way to adjust the settings so that I eliminate the black bars, but dont' end up with a squished movie?

Thanks for any advice.
maynard123
Posts: 8
Joined: Fri Jul 20, 2007 3:53 am

Post by maynard123 »

Well I changed the setting to the iPod 1.78 preset, which generated a width of 640 and height of 352. Autocrop cut 56 off of the top and 62 off the bottom. I then switched to manual and randomly cut 50 off each side (left and right).

It worked...no bars, great quality picture. I know I am missing some of the film, but I would rather have that small iPhone screen filled up iin order to see it easier overall.

I imagine that once the Windows GUI gets a preview screen like the Mac version, I might be able to do this by eye rather than just guessing at the numbers.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

Isn't this basically doing what the iphone does when you double-tap on the video, except you are forcing it by cropping the edges off?
maynard123
Posts: 8
Joined: Fri Jul 20, 2007 3:53 am

Post by maynard123 »

nightstrm wrote:Isn't this basically doing what the iphone does when you double-tap on the video, except you are forcing it by cropping the edges off?
Yes, except for some reason the video on the iPhone wasn't changing to full screen when I double-tapped. On some conversions, double-tapping fills the screen and other times it doesn't. I haven't figured out why.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

That's odd... I havent had any issues with my HB encodes not allowing me to fully zoom in if double-tapped, although I'm sure we're using a number of different settings.
maynard123
Posts: 8
Joined: Fri Jul 20, 2007 3:53 am

Post by maynard123 »

nightstrm wrote:That's odd... I havent had any issues with my HB encodes not allowing me to fully zoom in if double-tapped, although I'm sure we're using a number of different settings.
If I could get the double-tap thing to work regularly, that would solve all of my problems. I have tried various settings, but haven't figured out the right combination of settings. Could you tell me what settings you are using? I'm using the Windows GUI version of HB. Thanks.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

I'm using the following command line string: "-B 160 -R 48 -E AAC -e x264b30 -f MP4 -m -p -b 1500 -2 -T -x keyint=300:keyint-min=30:bframes=0:cabac=0:ref=1:analyse=all:me=umh:subq=6:no-fast-pskip=1"

I leave the aspect ratio and resolution alone and let HB maintain the aspect ratio automatically. This results in a 720x width resolution file that plays and zooms fine on my iPhone (and looks OK on my AppleTV).
Last edited by nightstrm on Mon Jul 23, 2007 3:54 pm, edited 1 time in total.
maynard123
Posts: 8
Joined: Fri Jul 20, 2007 3:53 am

Post by maynard123 »

Great..I will give that a try. I will be only using this on an iPhone, and would like to maintain relatively small files in order to maximize the available space on the iPhone...Do you find these settings give you large files, e.g., over 1GB for a movie?

Thanks.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

Yes, they are generally over 1GB each (typically 1-1.5GB). If I were going to minimize the file size for iphone, I would drop the bitrate to around 1000, and set the width to be 480 while ensuring "keep aspect ratio" is checked. This should allow you to zoom in on movies whenever you want on the iphone while giving you a smaller output file. I haven't tried this myself, but it should do the trick.
maynard123
Posts: 8
Joined: Fri Jul 20, 2007 3:53 am

Post by maynard123 »

Thanks..by the way, I have heard about "keep aspect ratio" being checked, but I can't find where I check that box. I use the Windows GUI version of HB...is that what you use? If so, where can I find that box for keeping the aspect ratio?

Thanks again
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

Hmm... I'm using the Mac version (and usually just use the command line interface); it is under the picture settings button off of the main page. I don't have any experience with the Windows version, so hopefully someone else can chime in.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

Well, the Windows GUI is just a front-end to the CLI and the CLI always defaults to keeping the aspect ratio.
jackj
Posts: 1
Joined: Wed Jul 25, 2007 2:51 pm

Post by jackj »

I've spent a ton of time trying to figure this out. For a 2.35 aspect ratio movie, set the dimensions to 480x208 and turn on Auto Crop. These are the dimensions that, at least on my computer, Handbrake shows to be "green". Other posters have suggested it should be 480x204, which makes sense (480 / 2.35 = 204), however for some reason Handbrake shows the 204 height to be "red". I'm not sure what the effect is of running it anyway at 204 vs 208 (does anyone know?) -- either way they are close.

For 1.85 movies, you'll generally find Auto Crop comes back with top and bottom numbers that generally add to 20. In that case, set the dimensions to 480 x 256. BTW, 2.35 movies tend to return top / bottom crop numbers that add to 122.

Finally, for true 16/9 (i.e., 1.78) movies (auto crop comes back with 0 for top and bottom), set dimensions to 480x272, and for 4/3 (1.33) TV shows, set the dimensions to 432x320.

Check out post #13 here as well:
http://forums.macrumors.com/showthread.php?t=321190
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Post by rhester »

jackj wrote:I've spent a ton of time trying to figure this out. For a 2.35 aspect ratio movie, set the dimensions to 480x208 and turn on Auto Crop. These are the dimensions that, at least on my computer, Handbrake shows to be "green". Other posters have suggested it should be 480x204, which makes sense (480 / 2.35 = 204), however for some reason Handbrake shows the 204 height to be "red". I'm not sure what the effect is of running it anyway at 204 vs 208 (does anyone know?) -- either way they are close.
208 is mod16 and recommended. 204 will work, but will result in reduced compression efficiency, which is why HandBrake shows it as red.

Rodney
Post Reply