YouTube on iPad - how?
April 24, 2010 2:20 PM   Subscribe

How does the iPad play YouTube videos?

Writeups tell us that the iPad does not recognize or play Flash applications. YouTube uses Flash to play its vides. So how is it that YouTube videos can play on the iPad?
posted by megatherium to Computers & Internet (18 answers total) 1 user marked this as a favorite
 
As I understand it, you have to download a special youtube app. At least, that's what someone retorted when I snarkily suggested that their iPad couldn't even see youtube.
posted by pazazygeek at 2:23 PM on April 24, 2010


YouTube videos are available in H.264 video compression, which is what the iTunes store uses for its own videos apparently. More here.
posted by BiffSlamkovich at 2:24 PM on April 24, 2010 [1 favorite]


This little support document explains why some out-of-the-box iPads can't display it and what the fix is.
posted by jessamyn at 2:28 PM on April 24, 2010


What BiffSlamkovich said.

They're just H.264 videos that youtube is providing.

Some videos aren't yet encoded in H.264 so you can't play them, this is generally limited to youtube's older videos.

pazazygeek: the app is on the device already. No downloading necessary.

Also you can view youtube video in other (non-apple) apps that use a "UIWebView" (a safari web browser view embedded in an app). In that case Youtube.com serves a special iPhone/iPad specific web page that does not use flash at all (and just links to the H.264 videos).
posted by schwa at 2:44 PM on April 24, 2010


Most Youtube videos are available at multiple quality levels, and most of the higher-quality versions are encoded in H.264, which the iPhone/iPad/etc. play natively. When you play the higher-quality H.264 versions on the web site, the Flash component is just used as a player. When you play a Youtube video on the iPhone/iPad/etc., it launches in the dedicated Youtube application, which just directly downloads & plays the H.264 file.

Plenty of other video sites work the same way, but without the dedicated application. Several Vimeo videos linked recently on MeFi have come up and played right in Safari on my iPod.
posted by Lazlo at 2:46 PM on April 24, 2010


I have an iPad, when I synched mine to my computer, the Youtube app was part of it, and I've watched about 100 videos there with no problem. So . . . yes!
posted by Dee Xtrovert at 3:06 PM on April 24, 2010


I have an iPad, didn't download shit, came with YouTube app. I thought it was HTML5?
posted by fixedgear at 3:29 PM on April 24, 2010


The YouTube app is built into the iPad. It plays special H.264 versions of videos that YouTube encode especially for devices such as the iPad, iPhone, AppleTV, Tivo, etc. etc.

It also plugs into Safari on the iPad so that when Safari detects YouTube embed code, the h.264 version is played instead.
posted by Mwongozi at 4:12 PM on April 24, 2010


Does anyone know if these are encoded on the fly or how Youtube deals with this (even in the abstract). I tried AirVideo and it absolutely killed my server on higher resolutions. I can't imagine that Youtube encodes and just retrieves what copy the client asks for, that would take a ton of space.
posted by geoff. at 5:00 PM on April 24, 2010


You don't need an iPhone/iPad to experience YouTube without Flash. If you have an HTML5 capable browser (Safari 4 or Chrome) you can join the HTML5 beta that sets a cookie so that the site serves you with the H.264 versions (where available) without the Flash wrapper.

If you have an older Mac this is highly recommended as the videos run MUCH better that way.
posted by Quinbus Flestrin at 5:10 PM on April 24, 2010 [1 favorite]


Does anyone know if these are encoded on the fly

My understanding (I'm too lazy to find a reference) is that new YouTube video is all stored in H.264. Flash can play H.264 so even when you are using the Flash version of the site the underlying video is still using the same source as the iPhone app or the HTML5 page (older video in the Flash format is obviously playable by Flash but not HTML5).
posted by Quinbus Flestrin at 5:16 PM on April 24, 2010 [2 favorites]


geoff, they are encoded into multiple formats and YouTube just serves whichever is requested. Yeah, it takes a ton of space, but storing all that video already takes a ton of space, so what's another ton? As you've seen, the alternative isn't exactly cost-free. Real-time encoding still takes a fair amount of CPU power, especially at higher resolutions.
posted by Good Brain at 6:47 PM on April 24, 2010


So a few points of clarification.

The "Flash" that YouTube uses on their site is the application layer used to play YouTube's videos. H.264 is a type of video encoding, FLV is an Adobe Encoding format, thats used often in Flash. However the Flash Player can play H.264 video or FLV video.

The type of encoding is a bit of a red herring though, whats important is the video player. Now just because you don't have Flash on the ipad doesn't mean you can't play YouTube's videos it means you can't play them with a Flash based video player. But you can play them with another type of video player. HTML5 which is the next generation of HTML supports playback of video natively (so the browser is the player). It also provides similar functionality to Flash so it makes a good replacement for YouTube's flash player.

All that being said I'm not sure what the ipad is using for YouTube video ;-P

Geoff I can't speak to YouTube's workflow but I'll tell you this, it would be ridiculous to encode their video on the fly - I have to believe they encode when you upload. I'm pretty sure that YouTube streams most of their video using HTTP and progressive download. This allows them to use a traditional CDN architecture for load.
posted by bitdamaged at 7:20 PM on April 24, 2010


To truly understand this, you should learn the difference between containers and codecs. Flash is a container. H.264 is a codec. Most YouTube videos these days are encoded using the H.264 codec and delivered using the Flash container if you are using a web browser that has the Flash plugin installed. On the iPhone/iPad, however, there is a native YouTube app which simply downloads and plays the H.264 video without the need for the Flash container. H.264 is a codec which the iPhone/iPad supports natively.
posted by Nothlit at 7:30 PM on April 24, 2010


(oh yeah I got that wrong Flash Video is a container, H.264 is a codec - H.264 is usually delivered in an MPEG container) There's really 3 levels here, codecs - how the video is encoded, containers - the wrapper that holds the audio and video and the playback mechanism - and the "player" - the utility that plays back the video.
posted by bitdamaged at 9:48 PM on April 24, 2010


FWIW, the iPad can play embedded Youtube videos in Safari (if they have H.264 versions), so you can watch them inline and don't have to open up the Youtube app .
posted by wongcorgi at 12:33 AM on April 25, 2010


Bitdamaged has it almost exactly.

They do encode as you upload, and these days that includes H.264--so iPhone/Pad compatible.

The older ones were encoded differently and those are currently unavailable. They are going back and re-encoding those vids, but they don't seem to be in a hurry about it (to be fair: they have a fuckton of videos to process.)
posted by ChurchHatesTucker at 9:46 AM on April 26, 2010


Most YouTube videos these days are encoded using the H.264 codec and delivered using the Flash container if you are using a web browser that has the Flash plugin installed.

As far as I can tell, Youtube delivers H.264 to the Flash player in an MP4 container.
posted by Lazlo at 10:08 PM on April 26, 2010


« Older Three ways to embrace dreams?   |   Should I stay or should I go? Newer »
This thread is closed to new comments.