Slashdot Mirror


Technical Objections To the Ogg Container Format

E1ven writes "The Ogg container format is being promoted by the Xiph Foundation for use with its Vorbis and Theora codecs. Unfortunately, a number of technical shortcomings in the format render it ill-suited to most, if not all, use cases. This article examines the most severe of these flaws."

25 of 370 comments (clear)

  1. Still better than AVI by Ltap · · Score: 3, Insightful

    No matter how bad it is, it's still better than AVI. I personally use Matroska, it has all of the ideological benefits (free, non-encumbered, open-source) over stuff like MP4.

    --
    Yet Another Tech Blog
    (but so much more, including game and movie reviews)
    http://yanteb.peasantoid.org
    1. Re:Still better than AVI by Anonymous+Psychopath · · Score: 4, Insightful

      I get what you're saying, but how is this different for Matroska than any other container format?

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

  2. Just complaining by Evets · · Score: 4, Insightful

    "I would have done it diffferently" does not mean that the format is bad. None of these "flaws" render the format unusable. Maybe it doesn't perform as well as another format, maybe it isn't designed the way you would like, but it's implemented, it's available, and it's in use.

  3. Re:already slashdotted ? by sopssa · · Score: 4, Insightful

    But there was a lot of interesting points though (I read it before it got slashdotted) and it went to technical points too. But what Ogg support, along others, basically comes down to:

    The third reaction bypasses all technical analysis: Ogg is patent-free, a claim I am not qualified to directly discuss. Assuming it is true, it still does not alter the fact that Ogg is a bad format. Being free from patents does not magically make Ogg a good choice as file format.

    This is so true, not only with Ogg or file formats, but also Linux and open source software too. The patent-free, open source and free are very rarely any good selling points. What it can actually do is. I can only hope more open source developers would get this - you can't sell the idea outside /. people for it being open and free, it also has to be better (or even on the same level).

  4. Not a selling point by XanC · · Score: 3, Insightful

    It's not a selling point, it's a starting point. It's a sine qua non. For an application like video on the Web, nothing non-free can even enter the conversation.

    1. Re:Not a selling point by Lunix+Nutcase · · Score: 4, Insightful

      Apparently the rest of the world disagrees considering the widespread nature of flash video that has always used proprietary audio and video codecs.

    2. Re:Not a selling point by maxume · · Score: 5, Insightful

      And then over here in actuality (rather than the conversation), there is Youtube. And Netflix. And Hulu. And so on.

      --
      Nerd rage is the funniest rage.
    3. Re:Not a selling point by egamma · · Score: 5, Insightful

      It's not a selling point, it's a starting point. It's a sine qua non. For an application like video on the Web, nothing non-free can even enter the conversation.

      Says who? XanC? Any format (and its software requirements) can succeed as long as the users will put up with it.

      RealPlayer did very well for many years (say 1995-2000).
      Apple Quicktime is used on many sites.
      And of course, there's Adobe Flash.
      To simply say that "nothing non-free can even enter the conversation" is ridiculous. Are your clothes free or open source? Your car? Your house? Your shampoo, your radio, your computer's processor, your keyboard?

      Companies can make excellent closed-source products. Communities can make excellent open-source products.

    4. Re:Not a selling point by vadim_t · · Score: 4, Insightful

      Says who? XanC?

      Add me to that list

      Any format (and its software requirements) can succeed as long as the users will put up with it.

      It can, yes. But there's a difference between what can be done, and what should be done.

      And of course, there's Adobe Flash.

      Actually, as of recently the Flash spec is available without restrictions, and there's gnash, a GNU implementation.

      To simply say that "nothing non-free can even enter the conversation" is ridiculous. Are your clothes free or open source? Your car? Your house? Your shampoo, your radio, your computer's processor, your keyboard?

      No, but I think they should be, it'd be better if they were, and that it's a goal well worth fighting for.

      Especially since we're talking about standards here, and I don't see how something with one possible implementation can be a standard. A standard is a published spec anybody can implement. "Buy from $company" isn't a standard.

      Actually, I think you used quite horrible examples as well. Let's see:

      Clothes: the "spec" is open. Anybody can make their own pants if they wish to, and nobody is going to come ask for license money.
      Car: Also open and well documented.
      House: Built according to code
      Shampoo: has a very loose open spec
      Radio: How to receive FM signals is well documented and not restricted AFAIK
      CPU: some (though not all) are open, with complete specs and source available
      Keyboard: Either PS/2 or USB, is made to fulfill an open specification.

      Every single thing you picked as an example complies with an open standard, can be made by anybody without needing to pay for a license, and is interoperable (any car from any manufacturer works and is legal to drive, so long it complies with the relevant standards for instance)

      Companies can make excellent closed-source products. Communities can make excellent open-source products.

      It's not about the quality. It's about a principle. I reject a closed "standard" for web video on principle, no matter how well implemented.

    5. Re:Not a selling point by sopssa · · Score: 3, Insightful

      And of course, there's Adobe Flash.

      Actually, as of recently the Flash spec is available without restrictions

      But Flash still uses H.264 too. I don't see too many people, either normal web users, webmasters or those making Flash applets complaining.

      It's good you reject closed-source products by principles, I wish I would too. But the reality is, people just want the best performing tool for the job and frankly the older I get the more I think so too. I had these fundamentalist ideas in late teen years, but then I faced the real world. Now I pick the right tool for the job, be it open source or closed. I use Windows on desktop because I game and think the experience is better, while still giving me freedom to mess around with the system. I use Linux on servers because they perform a lot better and command line usage with servers is a lot better, and in that case and scriptability Windows doesn't come even close. But fundamentalism and closed mindset in the end is just stupid.

    6. Re:Not a selling point by drooling-dog · · Score: 3, Insightful

      Mindshare has more to do with advertising and promotion than raw technical superiority. Proprietary, patent-protected technologies tend to florish simply because companies are more willing to invest in promoting them if they'll reap all of the benefits when they sell. If anyone and her brother could legally make and sell Gucci-branded handbags, then there would be no incentive for Gucci to spend $millions on advertising and you'd likely never hear about them.

    7. Re:Not a selling point by interval1066 · · Score: 3, Insightful

      Apparently the rest of the world disagrees considering the widespread nature of flash video that has always used proprietary audio and video codecs.

      And that will be fine so long as Adobe is always around to maintain and develop Flash, and people are always willing to use it. Personally, I can't see being married to one av format simply because it works, world opinion be damned, but it is what everyone uses. Until HTML 5 gets wider adoption, perhaps. Frankly, if I were Adoba I'd be getting out of the "Chief bottle washer and Flash maintainer" business myself, I hope for their sake they've poured money into something new that they've kept the wraps on, as I would hate to have as large a percentage of my business as they have based on 15 year old technology. I'd do that then just before I trotted the new stuff out let Flash wander out into the open source pasture.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    8. Re:Not a selling point by vadim_t · · Score: 3, Insightful

      But Flash still uses H.264 too. I don't see too many people, either normal web users, webmasters or those making Flash applets complaining.

      For now. Just wait until they decide to start charging for the license, then there will be plenty to complain about, but it'll be hard to avoid paying up, since it will be so widely used.

      It's good you reject closed-source products by principles, I wish I would too. But the reality is, people just want the best performing tool for the job and frankly the older I get the more I think so too.

      People are short sighted. I think long term.

      I had these fundamentalist ideas in late teen years, but then I faced the real world. Now I pick the right tool for the job, be it open source or closed.

      I had these ideas in late teen years, but then I faced the real world. I worked with proprietary stuff enough to figure out that indeed I don't like it, so I got a job where I work exclusively with Open Source and release my code under the GPL. It's really awesome, you should try it.

      I use Windows on desktop because I game and think the experience is better, while still giving me freedom to mess around with the system.

      I use Linux on the desktop because that's what works best for me -- though for me "works" nearly implies "comes with source". Even if it works now, some day it'll do something I don't want it to, or not do something I want it to. That's why I require the source upfront, then I don't have that issue.

      I use Linux on servers because they perform a lot better and command line usage with servers is a lot better, and in that case and scriptability Windows doesn't come even close.

      I use Linux on servers for the same reason.

      But fundamentalism and closed mindset in the end is just stupid.

      It's not fundamentalism, it's long term thinking. I don't like exchanging short term convenience for lock-in, licensing payments and major limitations later.

      And as the time passes, OSS software improves so things keep getting better. Maybe you should give it another try.

    9. Re:Not a selling point by jedidiah · · Score: 3, Insightful

      The rest of the world has always constantly complained about how buggy and slow Flash is. Even the HONEST "boosters" have freely admit to this problem. This is a problem that exists primarily because of the very proprietary nature of Flash. Although this does demonstrate how patents alone aren't such a barrier. EVERYONE has better video implementations than Adobe. This even includes multiple Linux video players.

      There are $200 general purpose PCs that make great little HTPC machines except for one little detail: Adobe's a sandbagger.

      This comes from letting crass corporations have the keys to the kingdom.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    10. Re:Not a selling point by VGPowerlord · · Score: 4, Insightful

      PNG gained support for three reasons.

      1. It's non-lossy, unlike JPG.
      2. It's does 24-bit color with 8-bit alpha transparency, unlike GIF which does 8-bit color with indexed transparency (one color is replaced with transparent).
      3. Unisys patent trolled companies/people who made image editors that could output GIF.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    11. Re:Not a selling point by hairyfeet · · Score: 4, Insightful

      I would say it is more because they work than any adverts. Take H264 as an example. Even on the lowest cost machines I build there is hardware acceleration out of the box for H26x, WMV 7-9, DivX, and MPEG 2 (and usually 4). This makes those formats much nicer to use, their playback much smoother, and the overall hardware more responsive because the CPU isn't bogged down with playback. In short it works.

      The average Joe really doesn't give a shit about "free as in freedom" all he gives a shit about is does it work and is it easy. That is why MP3 stomped Vorbis and FLAC, because it was easy (most of the files they downloaded/ripped were MP3 and every device supported it) and it worked (MP3 playback gave longer battery life over WMV, can't say about Vorbis as I've honestly never come across a Vorbis player) so they were happy little campers. As for website builders, if site A has H264 and gives me a great experience on my netbook/cell phone/etc and your site uses Theora and runs like shit? Well I'm not likely to return to your site now, am I?

      The problem with the OGG formats is the classic "chicken or the egg" problem. Nearly no support in hardware, doesn't work as well as established formats (thanks to hardware acceleration) and the average Joe really doesn't care whether a format has patents up the wazoo or not as long as it works for him, which considering like the other 90% he is probably using Windows or a cell phone/PMP with H264 acceleration it does. Sadly while I hoped that Theora might be the fabled "flash killer" I'm predicting it will be just like Vorbis, a niche format that almost nobody ever uses. Everywhere I go I see "H264 support" on hardware, I don't think there even IS a single device with hardware Theora support, is there? OGG being "free as in freedom" really isn't gonna matter much if nobody supports it, and I haven't seen hardware manufacturers rushing to add it to their bullet point lists.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    12. Re:Not a selling point by Risen888 · · Score: 4, Insightful

      MP3 playback gave longer battery life over WMV, can't say about Vorbis as I've honestly never come across a Vorbis player...

      The problem with the OGG formats is the classic "chicken or the egg" problem. Nearly no support in hardware...

      I don't think there even IS a single device with hardware Theora support, is there? OGG being "free as in freedom" really isn't gonna matter much if nobody supports it, and I haven't seen hardware manufacturers rushing to add it to their bullet point lists.

      You lose all credibility with nonsense like this. My Sansa Fuze plays ogg (flac too, but anyone who puts flac files on a 4gb flash device is taking it a little far). My dear departed iAudio X5 played ogg and flac. A fucking shitload of audio players play ogg. Go ahead, ask me why.

      "Why, Risen?"

      I'll tell you why. Because it's patent-free, unencumbered, and an easy bulletlist item to put on a device. No, maybe they "don't give a shit about freedom," but they do give a shit about easy.

      --
      Hey, I finally got my first freak! Took you long enough!
  5. Flawed reasoning... by Anonymous Coward · · Score: 3, Insightful

    There's at least one obvious flaw in his reasoning. He talks about removing the 8-bit version field in the header and replacing that with a 1-bit portion of the flags field to distinguish it from a hypothetical future version. That only works if one assumes there will only *ever* be two versions (v1 and v2). Such a basic failing of analysis is a pretty good indicator that he hasn't thought it all through as completely as he thinks he has.

    1. Re:Flawed reasoning... by Josef+Meixner · · Score: 4, Insightful

      It is not in the header, the 8-bit version field is in every single page. As according to the post a page is mostly 64K due to a strange length encoding, you send the version very, very often. I don't see any reason, why the version would have to change in the middle of a file in any case. And honestly, would you write a decoder taking that into account, if the probability of stumbling onto such a file was currently 0 (due to there being only one version) and very, very low in the future? That means it just adds to the size of the file.

      The second reason is even simpler, you only need one bit to tell the current format from the future formats. As there hopefully will be a good reason for a future version the page header will probably be different, so I can add a version field there when I at least found one reason why I need it, no? That way I need one bit now and can still have different versions later.

  6. what is the point, exactly. by theheadlessrabbit · · Score: 4, Insightful

    I'm not an expert in video or audio production, I just dabble in it as a hobby. but one thing I often wonder is, what is the point of these container formats?

    I've got a miniDV camera, and a canon point and shoot that thanks to chdk can record good-enough video. Both give me ".AVI" files, even though one is miniDV, while the other is Mjpeg. Mjpeg files don't work in my editor, while miniDV does. but I didn't know this at first, all I knew was that I have a bunch of .AVI files sitting in my hard drive, some work, some don't. I dont care about file extensions, I care about having files that work. I care about codecs. If they were named "filename.minidv" and "filename.mjpg" that information would be useful to me. What good is a container format when only half of the files within that container will play on my system?
    I'm not trying to knock the idea of container formats, if they exist, their must be some beneficial reason for them. Could someone please enlighten me on what that reason is?

    --
    -I only code in BASIC.-
  7. Re:Ogg is a nice format by Anonymous+Psychopath · · Score: 4, Insightful

    I can't say anything about video, but for audio all my CD collection is converted to Ogg instead of MP3, you can't even spot the difference in quality, thou the filesize is smaller. BTW, my MP3 player supports Ogg playing as well.

    Audio quality and compression efficiency are controlled by the codec, not the container format. The article is critiquing the latter.

    --

    Eagles may soar, but weasels don't get sucked into jet engines.

  8. Overly-large analysis of article by azmodean+1 · · Score: 4, Insightful

    Quite a bit of the analysis seems to be reasonable on the surface, but something about the way it was presented set me off in a geek-rant that I put in the comments. Since I'm having trouble posting that comment on the site, here it is.

    Many of the points sound reasonable, but the argument is strongly undermined by the fact that it offers not a single apples-to-apples comparison between ogg and any other container format in the article. On a section-by-section basis:

    Generalities/codec mapping:

    Article complains about how there is no global mapping, but does not assert that other containers have one.

    Overhead:

    The breakdown of where space is wasted is informative and mostly reasonable, but some of them seem to be a reach, such as the checksum being unneeded, and the suggestion of implementing the functionality in optional fields seems like a bad idea to me in general, since it will make the header variable-length, which is something to strongly avoid in my experience. Finally, when the article does "compare" ogg to mp4, it compares some rather hand-wavey numbers for ogg to a different scenario for mp4.

    Latency:

    The article fires off a bunch of numbers here, but then offers no comparison to the alternatives. In fact it don't even provide an explanation of how other formats avoid this latency in theory, much less in practice, and instead of showing how bad the latency is, it uses it as a platform to show that a naive reaction to the issue will cause bad header overhead.

    Random Access:

    In this section it lists quite a few worst-case numbers for disk accesses (why isn't it being pre-cached by the filesystem?) and then ends with no comparison to alternatives at all.

    Complexity:

    Once again it has a bunch of statements of problems the author has with the format, but no comparisons to "good" formats, in addition this section is particularly weak, with statements like, "implementation is annoying", and "ambiguity is bad".

    Final Words:

    "We have shown" is a rather specific claim to make, which the article has not remotely achieved. This pretty much sums up the whole article, which is titled "Ogg objections", but then tries in the text to bill itself as a rigorous analysis of ogg, which it is not.

    If the author had matched the tone of the article to the title, this would be reasonable, but he only hurts his position when he throws around phrases like, "True generality is evidently not to be found with the Ogg format.", "The Ogg format is clearly not a good choice for a low-latency application.", and "We have shown the Ogg format to be a dubious choice in just about every situation.". He has demonstrated NONE of the above claims, and by making them the article has rendered me skeptical of the rest of its claims.

  9. Re:Technical Objections by Armchair Engineer? by bbn · · Score: 4, Insightful

    I forgot to mention that one can do much better than a naive binary search. Read the first and the last of the file to calculate the average block size. Calculate the approximately place your target will be. Jump there and repeat. Once you are very close to your target, read a larger block of data which will get your target by a very large probability.

    This would get your target with not many more seeks than reading an index.

  10. Ah, and now slashdot... by xiphmont · · Score: 5, Insightful

    This whole thing is really about bad blood between Xiph and the mplayer folks. Once, long ago, I made disparaging remarks about a particular mplayer developer's extensive collection of ass hats, and they declared war. This stopped being about facts or reason years ago. Here's the last blog thread that got completely hijacked by the anti-Ogg container wingnuts. It's a hell of a read:

    http://blog.gingertech.net/2010/02/20/googles-challenges-of-freeing-vp8/

    So, rehashing this yet again: The Anti-Ogg bullet points [Not going to bother with complete sentences, because I've wasted too much typing on this recently]:

    1) A few of the mplayer/x264 hackers are right pissed that Ogg and Theora are getting all this attention when x264 is so obviously superior. That simply cannot stand. Since only America has patents and there are no computers there anyway, nobody should have to worry about them. Stick it to The Man! (How very ironic, Xiph being considered 'The Man' by folks contributing to an h264 encoder).

    2) Xiph should immediately drop Ogg for [insert container here], breaking millions of hardware decoders and hundreds of millions of software decoders:

    a) the [patented] mp4/MOV container is one suggestion they actually make seriously. Never mind adding 'willful infringement' to breaking the entire installed software/hardware base, this choice would totally redeem Xiph in their eyes. The benefit: by their own figures, it would reduce container overhead from .7% to .3%.

    (Except that number is wrong. I found later that DonDiego screwed up his mp4 overhead figures at the link above; I had simply assumed he got his container numbers right. The mp4 file in his example has almost identical container overhead to the Ogg, a shade under 1%. His demultiplexed mpeg audio and video had framing in them, so it made it appear the mp4 container overhead was much smaller when he subtracted their file sizes.)

    b) OK, mp4 is patented and no better, fine, Xiph should have just used Matroska from the beginning. Despite the fact that Ogg and Vorbis predated it by about five years (also mkv's not been able to interleave until just recently, which == no streaming). This is not to say you can't put Theora and Vorbis in Matroska. It's even a good idea! I've come to like MKV. But for streaming, Ogg is still much easier to deal with. Ogg was designed to stream, mkv was not.

    c) OK, so, mp4 and Matroska are right out for streaming, Xiph should use Nut, which is the system they designed. Nut came ten years after Ogg was already widespread. And looks almost exactly like Ogg. Which is not to say there aren't things about it I like that improved on the Ogg approach. Eg, the packet length encoding is better. It has a conditional checksum coverage feature I had never considered, etc. At some point we'll make those changes when that wouldn't mean completely abandoning any chance we have at adoption just to save a fraction of a percent and add... no new features.

    d) but.. but.. even FLV is better! OK, at this point I can't even entertain the arguement.

    3) OK, maybe not adopt another container, but Xiph should immediately improve/change Ogg for, breaking millions of hardware decoders and hundreds of millions of software decoders for a 'better' implementation that won't actually give users any features they don't have now. FOSS need _tools_, not us wasting time overoptimizing something they couldn't care less about.

    3) 64 bit timestamp! OMG, waste! Wait, mov/mp4 uses 64 bit stamps... Also, plenty of things in Ogg use a full byte instead of one bit because the container assumes octet alignment. Alignment makes it much faster/easier to deal with (you don't need a bitpacker to read pages, and you don't have to repack packet data to embed it into the page). Remember, all the completely unacc

  11. Ogg needs to die so Vorbis and Theora can live. by pslam · · Score: 5, Insightful

    I sadly have to agree, and I've voiced the same objections for a long time. It really is like he tells it: it's just bad at everything it was intended to achieve. It's a source of bugs, it's horrendously complicated to support, and it's horrendously inefficient at anything but audio (and even then, not so good).

    It seems to me, most of what went wrong was trying to support concatenation of Ogg streams. This is a nice idea, but actually quite a rare case. It's also incredibly naive for the specification document to request that Ogg implementation detect this. What, I'm supposed to scan the entire file in case that happens? No. I'll just not be compliant to that, thank you very much.

    I even wrote my own Ogg/Vorbis decoder from scratch a while back (and dabble every now and then), and found Ogg to be a never-cooling, never-extinguishing steaming pile of hippo crap left over from consuming a dog. It just made everything so difficult to do. Seeking a stream involves divide-and-conquer - not necessarily a bad thing, but when you have huge streams the number of seeks can be bad. Not to mention if your stream has an endpoint the other side of the Atlantic Ocean. Why oh why did they pick timestamps being at the END of a page and indicating the output byte count produced by the END of that page? That little detail alone probably cost me days of debug.

    I almost gave up at one point and went to a container format of my own which would have worked much better. Header: 'CONTAINER v1'. Packet: 'MAGIC', 4 byte Length, 4 byte Output pos. Job done. The sad fact is, that's easier than Ogg, smaller than Ogg (unless you're talking really low bit rate), and does entirely the job of Ogg without the complexity.

    I'm probably going to add a Matroska container to my codec just to see how easy they are to produce. The spec looks fantastic, but the devil's always in the details - although seeing the praise on various (engineer) forums, it looks like the way to go.

    So, Ogg, please die. We need you to get out of the way.