Writings on technology and society from Wellington, New Zealand

Thursday, August 21, 2008

Free formats!

Today on Radio New Zealand National I talked about how you save sound and vision on a computer, and about how broadcasters like Radio New Zealand can make their programmes available over the Internet. And I talked about the importance of free formats, and announced that RNZ is now progressively making its content available in the free Ogg format. Great decision, guys.

Read on for my speaking notes or listen to the podcast. In Ogg.

Q: Radio New Zealand has been making its material available on the Internet for years – is that what you want to talk about today?

A: Yes, I wanted to talk about how computers and the Internet handle sound and video. Computers mostly see sound and video as files in specific formats. And there are lots of different formats out there. For video, there’s AVI files, MOV which are Apple Quicktime, and WMV which are Windows media.

Q: And these formats tell the computer how to turn their contents into video?

A: Nothing’s ever that simple! There are two different things going on – the file formats are really just layouts for the files. To encode a video stream into a file, and to decode it again, you need to agree on how that’s done as well. And there are half a dozen or so different ways to do this. The encoding and decoding gets handled by a piece of computer software called a codec, short for coder decoder, and that has to be written fro your type of computer and for the type of encoding that you are using.

Q: Can you give me some examples?

A: There’s a codec called Xvid, which is in turn a derivative of one called Divx, and both of these are implementations of a standard called Mpeg 4. There are also standards called MPEG 1 and MPEG 2, Microsoft have their own called WMV7, 8 and 9, and then there’s H.263 which is particularly good at getting good quality clips out – it’s used in Apple Quicktime, and you can see an example of it on the Web if you download one of Apple’s Mac vs PC ads from the Apple website – really clean looking video which downloads quickly even on our New Zealand’s terrible broadband.

Q: Are these standards like MP3s?

A: Very much related, at least in the nomenclature, although MP3 is used to encode sound not video. The MP stands for motion picture. MP3 is actually a codec standard developed for movie soundtracks, although these days most people know it as a way to store sound files. To store a video file on a computer, you need to specify a file format, a video codec and an audio codec, and also the relevant quality settings you are using for each. Of course, all this is done for you by most computer systems.

Q: How do these things work?

A: It’s pretty complex as you can imagine! The objective is to get the size of the file down as far as is consistent with a decent quality picture or sound. You need to do that otherwise the file sizes would get extreme for video at least. If it wasn’t compressed, HD video, for instance, would need about 6 megabytes per frame. At 50 frames per second that would be a CD full of information every two seconds. So, we need to compress video to be able to store and transmit it digitally.

The basic principle for video is to only store the difference between successive frames. There’s a lot of detail about the precise way to do that, how often you transmit a complete new frame and so forth. For instance, if your video file only sends a complete frame every minute and just sends differences the rest of the time, if you skip to a location in the file and start playing it could take up to a minute before your player can sync up and start showing pictures. Another trick they do is compressing pictures so large areas all of the same colour are represented by a little information, just to keep the file size down. And they can be very effective.

Q: It can look very fuzzy and jerky.

A: Yes. That’s what happens as the compression more and more severe, so that the file can be made smaller an smaller. The different types of compression do have different characteristics, though, and some are better than others for giving you a clean picture at high compression.

Q: What about sound files?

A: The audio codecs like MP3 do other things as well. They throw away a lot of sounds that the human ear would tend to miss – small detailed sounds that are going on at the same time as louder sounds. Audio purists hate this, of course, and prefer digital sounds in so-called lossless formats like WAV files – that’s if they’ll tolerate digital at all. Some people insist of vinyl records (because they are analogue not digital) playing back through gear with radio valves instead of transistors.

Q: What about YouTube?

A: Oh, that uses a different file format again, called FLV or flash video. Older versions of FLV always used unique Macromedia codec, but recent files use H.264 video and AAC sound codecs. Incidentally, you can download YouTube videos and store them on your computer, or even convert them to some other form like AVI or MPG.

Q: Do you have to worry about the different formats?

A: You can get software that will play nearly anything. One of my favourite programs to play audio and video is called VLC. It’s free software – you can download it and use it without worrying. It’s pretty much an essential tool and it runs on most kinds of computer – especially Windows, Macs and GNU/Linux boxes. Google for VLC or check the links for today’s program.

There are problems, though, with some of these formats.

Q: Like?

A: Some of them can carry DRM, or digital restrictions management. That’s a way to control who can play a file back – it’s often used to restrict your rights to play a file. Microsoft’s WMV and WMA, and Apple’s AACS are the main offenders. The point is, that if a file could contain DRM you can’t be certain that it doesn’t, and so you can’t be certain that it will play on your computer or your iPod, or that it will continue to play next week or whatever. MP3 doesn’t contain DRM so you can be certain MP3 files will play on anything – anything that can play MP3s that is, which really is pretty much everything.

But there’s another problem. Some of these formats use patented algorithms.

Q: Can you explain that?

A: An algorithm is a recipe, as seen by a computer. Add 2, multiply by 6 and take away the number you started with – that’s an algorithm, although rather a simple one. What a video or audio codec does is use an algorithm – a recipe – to decode the video or audio file into something your computer can play back. And, in some countries, you can patent an algorithm. Incidentally, you can’t patent software algorithms in many countries, including New Zealand. It tends to be something that really big software companies want, and it works to the disadvantage of little software companies. Imagine you were writing some cool piece of software and before you can publish it, you have to somehow go through a vast list of patents to see whether a technique you have used has been patented by someone else.

And MP3 is encumbered by patents. Even though it’s the most commonly-used format, including by radio stations like this one – Radio New Zealand podcasts are mostly in MP3. That’s not a good thing. If Richard Stallman were dead it would make him turn in his grave – as it is, he rails against it, with good reason.

Q: Are there any formats that aren’t patented?

A: There are – they are called OGG formats, and they all live in a file container format called O-G-G. The OGG project is a project to create free audio and video formats that anyone can use and that aren’t encumbered by patents. They are the best formats to use if your supports them – and VLC does.

Within OGG there is an audio format called Vorbis that gives better sounding files than MP3, size for size.

Q: Where do these names come from?

A: Vorbis is a reference to Terry Pratchett’s novel Small Gods, part of his Discworld series, and that book is very much about people’s inhumanity to each other. The OGG video codec is called Theora and that’s a reference to Max Headroom, apparently. But the point isn’t the names so much as that a community has come together and produced free formats. You don’t need to pay to use them.

Q: Does anyone actually use these ‘free’ formats?

A: A lot of small sites which are committed to free software use the formats, but also some bigger players like the CBC in Canada.

And, I’m delighted to say, the webmaster here has told me that Radio New Zealand is starting to implement the OGG Vorbis format for downloads. They are starting with the Kim Hill’s programme and this one – starting this week, in fact – and will gradually moving across the whole station. Oggcasting (which are the same as podcasts except the audio is in Ogg format) will follow in a couple of weeks.

I think this is a really far sighted move and I applaud it. As a nation, we shouldn’t put up with our culture being locked up in formats that other people hold patents over. Remember, this is the radio station that cares about your freedom!


The techy stuff: Wikipedia about video file codecs and container formats.

Get VLC, a great free video and audio player for your computer.

Download YouTube videos to your computer.

Convert flash videos (e.g. from YouTube) to other formats.

The home page of free OGG formats.

posted by colin at 11:55 am  


  1. Another great programme thanks Colin. Having ditched Microsoft and Apple a few years ago its always great to hear your programmes about free and opensource alternatives.
    Yesterday I had the frustrating experience of moving a friends music files to her new computer. They were all DRM protected and in the end I just re-ripped them off her origional CD’s using linux software and made them available to both windows and linux on her machine.

    I was also thinking about the free as in speech thing and noted that over the last few months I have started contributing to help forums and with bug reporting. It’s kind of like a community service thing, you feel a compulsion to help others and enjoy doing it. So I guess although I didn’t pay $ for the software I use, I do pay with my time:)

    Comment by nzlbob — 21 August 2008 @ 1:07 pm

  2. It would be nice to hear more about Youtube
    it was mentioned on the radio that this website would tell more about saving youtube videos to file but I don’t see it.

    And how do you get the best out of youtube….?
    why do some uploads not show up in the search and some end up on Google ?

    Comment by Aaron Nicholson — 22 August 2008 @ 5:38 pm

  3. Aaron

    Here’s the relevant links from my Radio New Zealand links page:

    Get VLC, a great free video and audio player for your computer.

    Download YouTube videos to your computer.

    Convert flash videos (e.g. from YouTube) to other formats.

    As for getting the best out of YouTube – I just use the search tool for whatever I’m after. There are probably people who are far better at that than me. If you have a specific video which isn’t showing up, try writing to YouTube and ask them why.



    Comment by colin — 24 August 2008 @ 4:04 pm

  4. “Incidentally, you can’t patent software algorithms in many countries, including New Zealand.”
    What’s this then?
    I wrote to IPONZ to ask them about the enforceability of the numerous patents like that one that their online patent search service turns up, but they haven’t replied yet.

    “Q: Does anyone actually use these ‘free’ formats?”
    “A: A lot of small sites which are committed to free software use the formats, but also some bigger players like the CBC in Canada.”
    … and Wikipedia.


    Comment by Tim McKenzie — 25 August 2008 @ 6:38 pm

  5. Great interview! FYI, there are long lists of Ogg/Vorbis and Ogg/Theora content available on the web on the Xiph wiki, just in case you are every looking for examples.

    Be sure to add Radio New Zealand, once they are online with Vorbis!!

    Comment by Hampton — 26 August 2008 @ 1:55 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress