Showing posts with label watch live video on iphone. Show all posts
Showing posts with label watch live video on iphone. Show all posts

Monday, June 15, 2009

ooTunes milestones...

Just wanted to post a short mention of what I've been up to lately....
first off, ooTunes has been #1 in paid music apps in Canada for going on almost a week now :) I guess that's what I get for adding almost 800 Canadian streams for you iPhone / iPod Touch brandishing Canucks :) I was told also that at least for the first 8 reviews, I had an average rating of 5 stars!

Second, I've been getting station requests like crazy! As of today, I added the 10,000th stream to the full list of all ooTunes Radio stations here.

Third, the ooTunes server has been recently updated with beta support for sharing your photos. On Mac, assuming you use iPhoto for your photo management, you get albums, ratings, tags, titles, etc. On windows and linux, for now it's only going to scan directories for photos. The feature is off by default, be sure to turn it on in the Global preferences for ooTunes Server if you want to give it a try, and let me know what you think!

Fourth, I'm currently working to finalize the realtime video transcoding that iPhone OS 3.0 can take advantage of. The cool thing about this is it should eventually allow not only playback of videos in non-iPhone compatible formats or sizes, but also eventually live video (as in, from a TV tuner card, webcam, or even some live online video streams).

Fifth, I did the unthinkable! I finally pre-ordered an iPhone 3G S! Oh, and I developed, sold and supported a rather popular iPhone app entirely on a 1st Generation iPod Touch :)

Finally, later this week, as part of the release for the new iPhone 3G S, my family and I will be taking a little ooTunes promotional trip, it's fully experimental, but I'm really excited about it. I'll post a followup on how it goes here, someday...

Thanks for reading :)

Steve
ooTunes Nerd

Friday, October 10, 2008

Why you can not play live video on the iPhone

The question I and many others have about the iPhone is: 

Can we make it play live video?  

I'm not talking about prerecorded video (that's doable, and really easy, ooTunes does that already, along with tons of other apps, including the youtube app).  Also, I'm talking about this in the context of an officially released app in the app store, built using the iPhone SDK.  The problem has already been solved using the jailbreak toolchain, but doesn't work for official apps because of 3 and 5 below, and 4 below is still very applicable. 

I'd be ecstatic if someone would prove me wrong on any of this... so put in your comments, please!

So, nothing's impossible, but it's extraordinarily difficult for the following reasons:

  1. There is nothing built in to the iPhone to handle true rtsp streaming
  2. The only formats available to be played on the built in video player are .mov, x264 or mpeg4 all of which require a frame index in the moov atom at the beginning in order to be played as they're downloaded.  Unfortunately, for a live stream such information is simply not available until the encoding is finished.
  3. Should you desire to build your own video player, the SDK doesn't give access to the private frameworks that apple uses for video decoding or the raw framebuffer that a player would need to have fast display.  There are workarounds (that are suboptimal) but no one can show source thanks to the developer NDA that is still in effect. (technically this comment is probably out of line, though I've gleaned it from reading/searching the web, NOT from the sdk). 
  4. Without proper hardware optimized methods, you're going to be a battery hog, and probably limited in resolution.
  5. Now, imagining that all of the above is somehow overcome (which I am sure it has been by some)... now the question is: "Will apple accept your app into the store?"  It is against the terms of most (if not all) service provider's agreements to stream live anything (and video isn't going to be low bandwidth).

So, the options are:
  • Figure out a way to encode live video with predictable metadata (fixed frame boundaries and packet sizes)
  • Write your own video player from scratch to decode whatever type of stream you want (remember 3, 4 and 5 above)
  • File feature enhancements and otherwise petition Apple in hopes that they'll add support for RTSP or change their SDK to allow for this.
  • Encode in short snippets and try to play them back to back seamlessly, with no breaks... this way you almost have live video (delayed by the amount of time to encode and start playing a single snippet).
  • Give up on it?

So for ooTunes, I've learned the hard way all of the above.  My latest efforts have been in porting the ogg theora video codec.  I've gotten as far as decoding, but can't yet display fast enough due to 3 and 4 above.  It's questionable due to 5 whether it's even worth anyone's efforts.

Hope that helps someone, and I also hope that someone can prove me wrong on some of the negative stuff above.