Posts Tagged ‘iPhone’

iPhone and iPod Touch compatible video encoding, server side.

Sunday, October 12th, 2008

Some days ago, I published a tutorial with some bash scripts to automate the whole process of encoding MP4 files with H264 video and HE-AAC audio which are playable by flash players and the like.

Since I’m working on a really big project which involves a “youtube like” behavior, i though it would be cool to also create iPhone / iPod compatible streams (I’m amazed at the fact that 3% of the people coming to this site is using iPod’s or iPhone’s)… so, I did some modifications to the original script for it to generate the compatible streams.

Now, how am i dealing with this… well… let me explain you:

The iPhone specification states:

Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats

This means that the high profile streams that I am generating with the MKMP4 script won’t play, simple as that. So i have 2 possible approachs:

  1. I could just use a single low profile stream for the iPhone and iPod, and since the stream is H264 and low complexity AAC audio, it will just play fine on the flash players too.
  2. I could have 2 different files, one for the flash players (making use of b-frames, entropy coding, and a high profile stream, which substantially improves the final video quality).

I decided to use the option 2, mostly because i want to give desktop users as much quality as possible, and i want to use the HE-AAC encoder to save some extra bandwidth that i can instead use for the video stream, so I am using 2 different files, one for desktop users, and a different one for iPhone or iPod users.

(more…)

iPhone’s “Code Signing”: Is there any limit for the ridiculous ?

Sunday, March 9th, 2008

Some hours ago i was pointed to an interesting post about the new “code signing” features that Apple is going to implement for the iPhone software developers, and honestly, I am speechless…
There was a time when i used to believe that there was a good reason for Apple to be so closed in some aspects: To keep the user experience as clean and smooth as possible.
That could explain several behaviors in the iTunes Music Store, in the iPod and of course in the whole Mac platform, but after reading several times this great article at Rogue Amoeba’s blog, just one thing comes to my mind… “is there any limit ?”.

I still can’t believe the fact that it is just NOT possible to load an application inside an iPhone unless it’s blessed (read: digitally signed) by Apple, and yes, you read it right, not even for testing purposes, which means that if you want to start writing some code for the iPhone, you have to a) buy a $99 testing certificate, and b) buy an extra iPhone compatible with that extra certificate.
But the story continues….

Apple seems to have a list of things that they are not going to bless, like for example Porn, or “Bandwidth Hog” applications, and there is also the “unforeseen” category, which translated to plain English means “anything that we don’t like at all or we consider bad for our business model”.

I happen to believe that protecting the user experience as much as you can is a good thing, and that is mainly the reason because Mac OS is more enjoyable than any other OS out there, no discussion there, but when a company starts telling me what I am allowed to run (or not) on a device that i OWN, I think that something is really wrong. In my particular case, I don’t own an iPhone (and not even planning to own one, mostly because I use Nextel, and I wouldn’t change it for anything), for the contrary i own a Motorola headset, and i can load any application on it, or even write my own if I feel like.

No matter how much I love Apple and their products, I think that freedom of choice is one of the most valuable things that our society must protect, and while I read a lot of forum / blog posts by the so called “Apple fanboys” saying things like “if you don’t like it, don’t buy it” I just don’t want to believe what could happen if a company with this way of thinking becomes the market leader.

I have yet to see the evolution of this whole thing, but right now this just makes me re-think if some other eternally blamed companies are really sooooo evil after all…