Go Back   MacRumors Forums > iPhone, iPod and iPad > iPhone

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 6, 2009, 03:34 AM   #1
mathematician
macrumors member
 
Join Date: Oct 2003
Movie in Portrait Orientation on iPhone and YouTube

Hi.

Having a created a demo video for my application, I have a video in "portrait" orientation, i.e., the movie is 320 x 480 (w x h).

You can see the movie(s) here (for mobile Safari):
http://www.christian-fries.de/iphone/serialmail/demos
and here (for standard browsers):
http://www.christian-fries.de/iphone/serialmail
and here (You Tube)
http://www.youtube.com/watch?v=R7dWKhcrRV8

I realized several odd things which I could not resolve:

1) If I add the video to iTunes and sync it with iPhone, then iPhone plays in landscape orientation, adding huge black bars to the left and the right. Can this be changed?

2) If I post the video to YouTube it is also converted to landscape. I assume this cannot be changed since all YouTube videos have the same aspect ratio. However, the video quality is also degraded (compare the two above). Is it possible to have the video in better resolution? Should I upscale the video to HD by hand? If so: How can this be done?

3) If I create a webpage with dashcode (using the "video" element) the video starts in landscape mode, but if you rotate the iPod/iPhone back and forth then it rotates to portrait (contrary to whats happens in 1)). How can I achieve that the video starts right off in portrait orientation? See http://www.christian-fries.de/iphone/serialmail/demos for an example. Note however that on http://www.christian-fries.de/iphone/serialmail which uses the embed tag the video plays right off in portrait mode.

4) If I create a Cocoa app to play a movie using "MPMoviePlayerController" the movie plays always in landscape adding black bars to left and right - as in 1). Can I programmatically play the movie in portrait?

Best
Christian

PS: Sorry for packing four questions into one post.
mathematician is offline   0 Reply With Quote
Old Oct 6, 2009, 09:45 AM   #2
mathematician
Thread Starter
macrumors member
 
Join Date: Oct 2003
Playing in portrait mode using MPMoviePlayerController

OK. I figured out how to solve "Nr. 4", playing in portrait mode using MPMoviePlayerController: This can be done by use of an (undocumented) feature of MPMoviePlayerController (namely setOrientation). See
http://blogs.oreilly.com/iphone/2008...cal-audio.html

I am still looking for a solution to the dashcode and the YouTube issue. The strange thinig with dashcode is that movies first play in landscape but they do rotate to back to portrait. Using Safari with an embed tag the movie play right off in portrait mode...
mathematician is offline   0 Reply With Quote
Old Oct 6, 2009, 10:16 AM   #3
Small White Car
macrumors G4
 
Small White Car's Avatar
 
Join Date: Aug 2006
Location: Washington DC
Quote:
Originally Posted by mathematician View Post
2) If I post the video to YouTube it is also converted to landscape. I assume this cannot be changed since all YouTube videos have the same aspect ratio. However, the video quality is also degraded (compare the two above). Is it possible to have the video in better resolution? Should I upscale the video to HD by hand? If so: How can this be done?
Try this link.
http://www.youtube.com/watch?v=R7dWKhcrRV8&fmt=22

Putting &fmt=22 on the end forces the higher quality version to play.

That's for linking. For embedding, use the "Embed" code on the right side of the Youtube page but add this to the end of the Youtube address:
&ap=%2526fmt%3D22

It appears TWICE in the code, make sure you get them both.

If either of those don't work, replace the 22 at the end with 18. That's the slightly lower quality, but still higher than normal version. Sometimes the 22 version doesn't exist for all videos.

But after all that, yes, it's still kind of crummy looking. You need to try and make the video again as a 1280x720 file with your iPhone image centered in the middle and sized corectly. What editing program are you using? It should be possible with most.

Once you have that, use the '22' linking trick to make sure you're seeing the highest quality file available.
Small White Car is offline   0 Reply With Quote
Old Oct 7, 2009, 06:06 AM   #4
mathematician
Thread Starter
macrumors member
 
Join Date: Oct 2003
Thank you for tip with the fmt=22! As you mentioned, upscaling the movie to HD prior to uploading it to YouTube dramatically improved the video quality.

Importing the 320x480 into iMovie HD and saving it to 1280x720 (as MP4 with 5 Mbit/s) added black bars to the left and right and rescaled to movie to HD resolution. Uploading this "post-processed" movie to YouTube results in much better quality on YouTube (even for the standard definition). (Although YouTube advises that you should not transcode the movie or add the black bars). I believe the point is that once a movie is in 720 you tube uses a different algorithm compared to a movie beeing in 480.

Compare:


Uploading a 320x480 movie to YouTube:
http://www.youtube.com/watch?v=dzrnelV-05M
same in HD:
http://www.youtube.com/watch?v=dzrnelV-05M&fmt=22
Note: Both have poor quality.


Uploading the upscaled movie to YouTube
http://www.youtube.com/watch?v=s8ZswqidzYc
same in HD
http://www.youtube.com/watch?v=s8ZswqidzYc&fmt=22
Note: Quality is much better, although the original source was indeed the same. Also: standard definition quality is better than HD of the previous (320x480) example.
mathematician is offline   0 Reply With Quote
Old Oct 8, 2009, 03:22 PM   #5
mathematician
Thread Starter
macrumors member
 
Join Date: Oct 2003
How to upload hight quality app demo video to YouTube

I have experimented a bit. Here are the results:

If you have a demo video of your iPhone app in 320x480 and which to upload it to YouTube, you should upscale it to HD. Open the video in QuickTime 7 Pro and export it as MP4 with Video Format H.264, 2000 kBit/sec, 1280x720 HD and check "Preserve aspect ratio using Letterbox".

Then upload the 1280x720 HD. The result will have much better video quality compared to what you get if you upload the 320x480 directly.
mathematician is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iPhone

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
The portrait orientation lock icon does not appear anywhere palmharbor iOS 5 and earlier 1 Jul 21, 2013 01:12 AM
iPad VS iPhone video orientation boiee iOS 6 3 Jan 18, 2013 11:38 AM
amusing... the youtube movie director whoknows87 Politics, Religion, Social Issues 1 Sep 14, 2012 09:48 PM
iPhone Screen Orientation Support bluemvj iPhone/iPad Programming 3 Aug 22, 2012 08:27 AM
Portrait orientation in Imovie carsfeverguy Digital Video 4 Jul 13, 2012 03:11 PM

Forum Jump

All times are GMT -5. The time now is 04:38 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC