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?

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...

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?

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.

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.

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.