Question about YouTube videos

What format are most videos on sites like YouTube?

Being an “old-timer”, I just assume that most videos are .mpeg

But maybe these days everything has been converted to Flash videos? (Or am I dating myself again? Do those even exist?!)

Debbie

They usually serve up a number of formats, as there isn’t one video format that works on all devices. So, for example, on most devices they probably serve up a flash file, but on an iPhone/iPad you’d see a mp4 file or similar. They have been moving down the HTML5 video route, but there are various formats needed to cover all devices there too. The nice thing about YouTube is that they do all the conversions into file formats for you, which if you are doing this by yourself, you have to create multiple versions of the video yourself.

Is there anyway - as a viewer - to know if you are watching an .MPEG or .AVI or FLASH or whatever?

Back in the day, a “Flash” video wasn’t a true video - at least not to me?!

Oh, and is there still a .swf (Shockwave) thingy out there?

Debbie

Since we’re currently in a transition period, thanks to the lack of flash support on mobile devices and the introduction of HTML5, we have a few different common formats:

FLV: flash video format which was the most widely used for a few years, until the introduction of HTML5. This requires a flash-based media player.

H.264 MP4: (aka mpeg-4). This is a common video format which has a high compression ratio with a small filesize without destroying quality. Many flash video players support this format, and certain browsers support it through HTML5. However, the patents are owned by MPEG-LA, so this format is technically not free to use. As such, firefox offers absolutely no support for this format because of licensing issues.

Ogg Theora: Similar to H.264, but free and open source. This was mozilla’s first choice as a competitor to H.264 to use as the default supported format in Firefox.

WebM: Google developed this, based on other open source formats. It was google’s default supported format in Chrome.

Here’s a table displaying which browsers and versions support which video formats for HTML5: [URL=“http://en.wikipedia.org/wiki/HTML5_video#Table”]http://en.wikipedia.org/wiki/HTML5_video#Table

Currently, Ogg Theora and WebM are full supported in all the major browsers except IE. It should come as no surprise that once again, you have to treat IE differently. Also, Safari, doesn’t support anything without a plugin.

So, the situation: the general landscape is moving toward HTML5 media players. While flash media players support all desktop browsers, they leave a number of mobile devices out in the cold. Since mobile is popular, that is potentially a large portion of your audience which won’t be able to access your media content.

As for HTML5, supported by desktop and mobile browsers alike, there is the issue of the major browsers not supporting a single video format across the board. As such, most folks end up having two or three copies of the same video in different formats. Some example HTML:

<video width="640" height="480" controls> <source src="myvideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> 
<source src="myvideo.webm" type='video/webm; codecs="vp8, vorbis"'> 
<source src="myvideo.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video>

So, the browser should be able to choose a supported format.

In addition to implementing HTML5 video tags, some folks also offer a fallback to flash video players if a browser is not HTML5-capable, and can still support flash. But–this pool is rapidly shrinking.

In order to determine what is best for your particular site, you will have to look at the browser analytics data of the visitors on your website.

Normally on YouTube you are watching a Flash file (.flv). (For example, if I disable Flash in my browser, I just get a message from YouTube that I can’t view the file.) Yet on an iPhone or iPad, you can view the files, even though they don’t support Flash. In that case, YouTube directs you to the mobile version of the site and then serves up a 3g video format (.3gp or something like that).

If you get a Firefox add-on like DownloadHelper, you can download YouTube vids in a range of formats, such as .flv or .mp4.

Wow! That was more than I asked for or expected?! :eek:

I was just asking a preliminary question for some more specific questions I had.

Would prefer starting a new thread, but hate to waste the nice, long response… :-/

Debbie

There’s a difference between disabling flash with a plugin locally and not having it installed at all. The browser agent information still includes the version information about flash being installed, so the website would deliver content meant for flash. If you didn’t have flash installed, you should see the HTML5 player if you’re using a browser that supports it.

Hm, that’s what I expected: I disabled Flash in Firefox and refreshed the page, only to get a message that I needed Flash … which was a surprise. Will try with some other browsers and check the results.

[font=“comic sans ms”] I thought the html5 site of youtube was still beta or something and you needed to choose it?

One issue with HTML5 video is, with the exception of the Apple-only proprietary streaming protocol (maybe likely to become a mobile/HTML5 standard tho?), HTML5 video doesn’t stream.
Link about the HSL streaming protocol though I can recommend one very good place for information about video on internet: the creator of the JWPLayer has somewhere a bloggy-thing (maybe at his company Long-Tail Video, I forget and am too lazy to find it again) explaining in detail the formats, issues, fallbacks and streaming.[/font]

Yep, I just discovered that you have to choose it overtly for it to work. Strange that you have to do that if Flash is disabled, though.

Off Topic:

Do you really like Comic Sans? Arrrgh! I find it hard to read.

[ot]I agree it’s hard to read. I’m just being an @$$. It’s a phase I’m going through. But maybe I should add size tags too : )[/ot]

[ot]

I’m in that phase, too … although I’ve been in it all my life, so I guess it doesn’t really qualify as a phase.[/ot]

[ot]I’m curious to know, @Stomme poes ;, what kind of mood is reflected when you use comic sans… does it mean that you’re sad, that you simply don’t care or that you’re bored, happy?

@ralph.m: No, Ralph, if you’ve been in it all your life is not a phase :p[/ot]