Slashdot Mirror


Ogg Format Accusations Refuted

SergeyKurdakov sends in a followup to our discussion a couple of months ago on purported shortcomings to the Ogg format. The inventor of the format, Monty "xiphmont" Montgomery of the Xiph Foundation, now refutes those objections in detail, with the introduction: "Earnest falsehoods left unchallenged risk being accepted as fact." The refutation has another advantage besides authoritativeness: it's far better written than the attack.

31 of 248 comments (clear)

  1. Obligatory by Anonymous Coward · · Score: 5, Funny
  2. Re:tl;dr by gknoy · · Score: 3, Informative

    Summary so far:

    Many of the complaints levied against Ogg were not about its technical merits, but about its inadequate documentation -- a feature Matroska shares. Other complaints were about features of Ogg (such as mappings) which nearly every other container format has as well. ... I've only gotten about a quarter of the way through, so far.

  3. Well written, and informative, but... by Dragoniz3r · · Score: 4, Informative

    ... the last time we discussed this, didn't the consensus eventually become that ogg isn't a fun container to work with, despite the fact that the guy who wrote the rant about it was a moron for wanting to trim headers that contribute fractions of percents to the overall size of files? I know I personally have worked with ogg, and it was a pain in the ass, mostly because (as the author of the format admits) the documentation blows.

    1. Re:Well written, and informative, but... by imsabbel · · Score: 5, Interesting

      Yeah.
      Also, for some reason there seems to exist no player in the world that can skip or jump in a video inside an OGM container without severe slowdowns and pauses even on an Core i7. Something that does simply not happen for avi, mp4, mkv or even mov (which is more or less mp4).

      --
      HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
    2. Re:Well written, and informative, but... by BikeHelmet · · Score: 4, Interesting

      I've noticed the same thing. MP4, MKV, AVI, etc. are instant, but ogv (ogm according to GSpot) has multi-second delays when seeking to specific parts of the video.

      I must be doing something wrong... and yet it's the same for every media player I try.

    3. Re:Well written, and informative, but... by Dragoniz3r · · Score: 5, Insightful

      Certainly better written than Rullgard's hatchet-job. Maybe I'm just used to reading technical documentation (RFCs and the like), but I really dislike reading the flippant opinions of some hack with an axe to grind. Much prefer reading the technicalities of the topic and making up my own mind.

    4. Re:Well written, and informative, but... by EMN13 · · Score: 4, Informative

      As the article notes, .ogm isn't actually a normal ogg container, so the author isn't disputing issues with ogm (he calls it an ugly windows specific hack). And in any case, if you use a codec set to use few keyframes, you'll get poor seek performance in *any* container format - it's quite likely the issues you saw had everything to do with the encoding choices made and little with the (deprecated) ogm container.

    5. Re:Well written, and informative, but... by Hatta · · Score: 3, Informative

      Have you tried it with MPlayer? I just tried it with an OGV from archive.org. Seeking was instantaneous.

      --
      Give me Classic Slashdot or give me death!
    6. Re:Well written, and informative, but... by evilviper · · Score: 4, Interesting

      And in any case, if you use a codec set to use few keyframes, you'll get poor seek performance in *any* container format - it's quite likely the issues you saw had everything to do with the encoding choices made and little with the (deprecated) ogm container.

      Not at all. Every other format listed as having good seek performance has an INDEX. Ogg/Ogm does not. Lacking an index generally results in broken frames when seeking as well.

      The are a couple efforts to get Ogg files indexed, but Xiph.org remains utterly indifferent, so you can expect it to remain an unsupported bastard step child like OGM, which is also only unofficial because Xiph can't be bothered with other people's needs.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    7. Re:Well written, and informative, but... by Trepidity · · Score: 4, Insightful

      It's a different kind of flaw, though. Rullgard was arguing that Ogg is inherently technically flawed. Arguing that it's technically fine but unusable due to a lack of documentation is a different argument.

    8. Re:Well written, and informative, but... by Daengbo · · Score: 3, Informative

      I guess you didn't RTFA (Don't feel bad -- I only got 80% through before throwing in the towel). OGM's status is thoroughly explained, and the author talks about adding indexes in the next version of OGG, due to concerns about HTTP over satellite.

  4. And don't forget by Anonymous Coward · · Score: 5, Funny

    "Whenever you want information on the 'net, don't ask a question; just post a wrong answer."

    -- Cancer Omega

  5. Re:tl;dr by Anonymous Coward · · Score: 5, Informative

    Nearly every other container format+codec has exactly two bits that are codec dependent: an identifier (e.g. 'XVID' or "V_MPEG4/ISO/AVC" or a number) and binary private data/codec-specific init data/whatever you want to call it. Some codecs in some containers additionally define one bitstream, if the codec has multiple possible (h.264).

    Timestamps, dimensions, aspect ratio, framerate, samplerate, etc. are stored in codec-independant ways in the container.

    Ogg is not like that at all. The only thing it stores in a codec-independant manner is framing. Every other piece of information you might expect a container to have is stored in a codec-dependant manner. Even metadata!

    I have no fucking clue why the creator does not see this as the problem that it is for everyone that tries to work with ogg.

  6. Re:tl;dr by dgatwood · · Score: 4, Interesting

    What possible use could you have for obtaining time stamps within a video stream that you cannot decode? As far as I'm concerned, a container format should provide enough information to determine two things:

    1. A CODEC identifier (magic/FOURCC)
    2. The physical length of each frame's data so that decoders that don't understand a particular CODEC can skip it.

    Although there might be advantages of having other data encoded in a consistent fashion for people writing debug tools, when it comes to general software, as long as the CODEC software provides a standard set of accessor functions that return the data in a consistent way across all CODECs, it is by no means a requirement that they be stored in the same way, and in terms of the format's long-term flexibility, it is advantageous to allow the data to be stored in a codec-specific fashion.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  7. The goal by DaMattster · · Score: 4, Insightful

    Funny, I thought the goal was to get away from a patent encumbered format. Does Ogg work? Is it reasonably close to MP3/4? I believe the answer is yes to both. Now is Ogg as efficient as MP3/4, I cannot really comment because I am not that technically versed. If a standard HTML5 Video is adopted, it should and must be patent unencumbered. Rather than this nitpciking, I would love to see that same energy poured into improving Ogg. Like any design, Ogg can be improved upon to reach the same robustness of MP3/4.

    1. Re:The goal by kiwieater · · Score: 4, Interesting

      I've always found Ogg/Vorbis to be superior to MP3. Using semi-good gear(electrostatic headphones, for the geeky folk), I find Ogg at q6(average of ~192kbps) to be nearer to CD quality than an MP3 at any bitrate - it's transparent in 95%+ of tracks.. Some music isn't transparent on either format regardless of bitrate, but Ogg has always tended to give better quality for a given filesize. All in my experience...

    2. Re:The goal by jasonwc · · Score: 4, Insightful

      The problem with this argument is that it somewhat misses the point. MP3 is "good enough" for the vast majority of users at LAME V0/V2. I would venture a guess that 95-99% of persons couldn't ABX at V0 in perfect conditions (expensive amp, DAC, and high-end headphones), yet if we're talking about the use of a DAP and earbuds, it is quite clear qualtiy isn't relevant.

      MP3's primary advantage is its effective standardization and universal support in all hardware and software. This single advantage far outweighs any benefit Ogg Vorbis can provide. An MP3 can be played on any DAP, on any operating system (with the right codecs), and all music software. It's therefore the preferred lossy sharing format. On the large music trackers, Vorbis makes up fewer than 1% of lossy downloads by file size and # of downloads. MP3 is the clear preference.

      The fact is that, while Ogg Vorbis, may be better than MP3 quality-wise at V0 or 320 CBR, this is not the main point of lossy audio. If your primary concern is quality and archival, you shouldn't use any lossy format. You should use FLAC - it is open source and has superior error detection features (MD5/CRC for each frame, use with Accuraterip to verify any disk).

      I use FLAC on my desktop and only download EAC rips with 100% logs, or try to, at least. This ensures that my downloads are "perfect rips", and the encoding process has not reduced quality at all. With a single click, I can verify my FLACs against the Accuraterip database to ensure they are perfect.

      No lossy format provides this benefit. If I want to put the music on my iPod, I can convert it quickly with my Core i7 (45 seconds an album). I can convert my entire collectoin in several hours.

      So, why use OggVorbis over FLAC?

  8. Re:Really? by postbigbang · · Score: 4, Insightful

    And more importantly, they're wrong, in the eyes of its developer.

    It's a cogent flame of his critics, but it also exposes what are plainly design differences-- and his critic's non-nuanced eye. You have to appreciate someone that can split hairs so finely when taking a set of arguments apart. I like thinkers.

    --
    ---- Teach Peace. It's Cheaper Than War.
  9. This matches my experience by Anonymous Coward · · Score: 5, Funny

    The best way to get documentation out of a project is trash talk it until a developer gets into such a frothy rage he explains it in a manner "even an idiot could understand." Used to do this all the time in the early years of Linux, worked like a charm :-)

  10. Re:tl;dr by Rockoon · · Score: 3, Interesting

    As far as I'm concerned, a container format should provide enough information to determine two things:

    Basically, what you just wrote is "there shouldn't be containers."

    Is that really your position? I certainly can understand it. It has that quality to it that any hack can go ahead and start coding to handle it immediately, which is great. But checking with reality, we seem to have so many container formats because ID/LEN is just not enough for purposes.

    --
    "His name was James Damore."
  11. Ogg format considered not as good as MPEG by kegon · · Score: 3, Insightful

    From the article:

    When Xiph started out in the early ninties, MPEG was hardly dominant.

    When MPEG-1 started it closely followed H.261. H.261 was very well written. Back in 1994 when Xiph started, MPEG-1 had already been going 6 years.

    Ogg is full of strange fields and difficult to read structures. The author of the criticism is right to question it, especially when Ogg used similar fields but changed the names. There was never any need to change terminologies. H.261 and MPEG-1 were well written standards but not freely available and included patented technologies. The "not freely available" means that you have to buy it, not that it's secret.

    If Xiph wanted to produce a free standard for video coding they could easily have adopted the same terminologies and similar structures, defining their own versions of them and recommending unpatented technologies. Instead they chose their weird terminology and rushed to come out with something different without spending the time to work out how difficult it would be for users to implement and what quality it would give. H.261 and MPEG were backed up by masses of research by companies and universities of which much was freely available in journals and conference proceedings.

    The idea that "MPEG was hardly dominant" is the thought of someone who either didn't do his homework at the time or a revisionist. VCD (created 1993) was massively popular in the second half of the nineties, or doesn't that count ?

    From the summary:

    it's far better written than the attack.

    I wish it had been. If you want to refute a rant, pick some illustrative points and clearly answer them. Don't pick apart the text, all of it, sentence by sentence. Fancy colouring and highlighting don't make it better written.

    1. Re:Ogg format considered not as good as MPEG by Haeleth · · Score: 4, Interesting

      VCD (created 1993) was massively popular in the second half of the nineties

      Really? I don't think I ever saw a single VCD on a store shelf. I recall they existed, and I think I even watched one once, but basically they were a brief fad that completely failed to make a measurable dent in the VHS market and rapidly disappeared without a trace. That's not what I'd call "massively popular".

      If you want to refute a rant, pick some illustrative points and clearly answer them.

      That is exactly the wrong thing to do. If you don't answer every point, then your opponents will simply pick out the points you omitted and claim that your failure to refute them proves that they are valid.

      Fancy colouring and highlighting don't make it better written.

      Who said they did? What makes it better-written is the higher quality of the prose. The supporting references and the real-world measurements help, too.

  12. It still doesn't address many real world problems by pslam · · Score: 5, Informative

    My rant with Ogg is not so much the minute details of the format itself but that it works badly in a few common real world cases:

    • Resizing metadata. It's stored at the beginning, so resizing the metadata requires moving the majority of the file around (or rewriting it).
    • Metadata growing across a page boundary (64KB). Not unlikely if you're storing anything substantial such as album art. I know, that's slightly abusing it, but it's convenient to go there and it's common practice. The trouble is this affects the page numbering, requiring every page in the stream to be renumbered, and then every page including its contents to have its CRC recalculated. Very expensive.
    • No index. Seriously, why can't we have an index? It doesn't have to be at the beginning of stream - the end is fine too. Which leads me to...
    • Random access video across a high latency link. Think that's uncommon? What about cell phones playing a web-hosted video, where 1000ms+ is the norm? Or even laptops with a 3G access dongle? An index (even a small one) mitigates the issue, even if placed at the end of stream.
    • Mandatory per-page CRC forces low-latency streaming to use single packet per page. Demux cannot continue before an entire page is received, which increases latency by the number of packets in a page (minus 1). Per-packet or even no CRC would be more appropriate.

    I know it's all been said before, but these are pretty common cases and Ogg isn't great when you have to deal with them. Everything else is nit-picking. I'm not a fan of the minute details of the format either, to be honest, but the above are real world examples of where it falls a little short. I should add that none of these issues make it unusable in any of those situations: just annoying.

  13. Re:Really? by icebraining · · Score: 3, Insightful

    He didn't say it was good, he explained why it is good.

  14. Re:tl;dr by Anonymous Coward · · Score: 4, Informative

    And you're ignoring the problem that with ogg you have to hunt down and read the spec of every single codec that you want to implement demuxing support for, and that it is impossible to have, say, a generic lightweight file analyzer that tells you duration, codecs used, metadata, samplerate, framerate, etc.

    From the article:

    "This is commonly asserted by detractors, but a combination of false and missing the point.

    Ogg transport is based entirely on the page structure primitive, described accurately above. There are no other structures in the container transport itself. Higher level structures are built out of pages, not built into them. All Ogg streams conform to this page structure and all Ogg streams are parseable and demuxable without knowing anything about the codec. "Drop the needle" anywhere in an Ogg stream and start demuxing; you get the codec data out without knowing anything about the codec. You possibly won't know what exactly to do with that data without the codec mapping and the data is possibly useless without the codec anyway, but that's true of every container.

    To avoid being accused of sidestepping the issue, I posit that the actual [if unstated] objection is that the Ogg container does not fully specify the granule position in the transport specification. Beyond a few requirements, a codec mapping defines the granule position spec for that codec's streams, not the Ogg spec. In theory, this would mean that without codec knowledge or some other place to find the granule position definition, a decoder missing the codec for a given stream would not be able to determine the timestamp on the stream that it is not capable of decoding anyway. In practice, the granule position mapping does in fact exist in the stream metadata within the Skeleton header[7] (as it would be in Matroska or NUT). Additionally, the Ogg design allows implementations to ignore the pretty design theory and just do things the way other containers do by building granule position calculation into the mux implementation.

    There's specific considered reasons for the granulepos design which take some space to explain accurately. Because Mr. Rullgard also wrote a lengthy diatribe against Ogg timestamping[8], I'll leave the explanation for there and link to it here when my response to the other article is live."

  15. Re:tl;dr by Anonymous Coward · · Score: 3, Informative

    Too bad that in practice, I've seen a skeleton header maybe once. And anything optional is guaranteed to be missing in many cases. Thus to demux a new codec you still have to find the codec spec, find the ogg mapping, write the granule demangler, write a parser for the codec headers, etc. instead of adding a single entry to a table like you would for sane containers.

    I think this speaks to your own inexperience more than anything else. Here's an ogg video with a Skeleton stream:

    http://videos.videoonwikipedia.org/video/275/cell-phone-engineerguyogv

    You can find many more with Skeleton streams at http://videos.videoonwikipedia.org or http://openvideo.dailymotion.com or http://www.archive.org or many other sites. I can only conclude that you are not very knowledgeable about ogg usage in practice.

  16. Re:Does MPEG-TS have indexes? by NoMaster · · Score: 4, Informative

    That's because MPEG Transport Streams have an easily-accessible Presentation Time Stamp (PTS) in each GOP header, and it's reasonably easy to calculate the increment between PTSs (which will vary with framerate). The simplistic explanation is that the GOP header has the bit rate* & framerate; you can calculate the PTS increment either from the framerate or examining adjacent blocks, you then check the current PTS, calculate the desired PTS from that, and can then jump to the appropriate part of the file to find the PTS you're after.

    (That's assuming you're working with a TS file, where the player can examine the first & last block to determine file length. With streaming, you're restricted to working with what's in the buffer (& hopefully your app knows how long the buffer is, since it allocated it!))

    Ogg, AFAIK, doesn't have that info in the block header - IIRC it relies on the bitstream having presentation timing stored in it (i.e. none, in the case of most audio formats), which means you have to decode the block to find it. It was done that way to allow for variable framerates to be stored without having to build a huge index. MKV is a bit better in this respect, but it's a remarkably fragile container.

    * It falls down a bit sometimes, particularly where the bitrate in the block header is set to max (15Mbps), or where you're using VBR. With the latter the calculation will usually get you in the ballpark; with both cases, some splitters/decoders calculate the bitrate themselves while playing, store it, and use that for seeking.

    --
    What part of "a well regulated militia" do you not understand?
  17. Re:tl;dr by Rockoon · · Score: 3, Insightful

    ID and LENGTH is not a "container" by any definition that I have ever heard of or used in practice.

    What you are describing is a common ordinary linked list.

    None of the containers that I am aware of require you to understand the video data in order to play the audio data, so what the heck are you actually getting on about? That "containers" should be ordinary linked lists?

    In reality, thats not fit for purpose. That media file contains at least two stream, and while each stream can be treatable as independent, they can also be treatable as semi-dependent. There exists information that is shared between streams. For example, metadata.

    If I am not required to decode the video stream, then you can't put the shared metadata in the video stream. If I am not required to decode the audio stream, then you can't put the shared metadata in the audio stream. So what then?

    And thus, the media container is born. Linked lists just don't cut it. These formats are more than linked lists for a real (and I gave only one of them) reason.

    --
    "His name was James Damore."
  18. RTFA. by SanityInAnarchy · · Score: 5, Informative

    From TFA:

    An index is only marginally useful in Ogg for the complexity added; it adds no new functionality and seldom improves performance noticeably. Why add extra complexity if it gets you nothing?

    You can do seeking without an index:

    A binary search is discussed in the spec for ease of comprehension; implementation documents suggest an interpolated bisection search. So far, this is the same as Matroska and NUT.

    The only difference being, Matroska implementers tend to be lazy about implementing the indexless seeking properly, and people tend to use indexes, thus propagating this myth even more.

    The Vorbis source distribution includes an example program called 'seeking_example' that does a stress-test of 5000 seeks of different kinds within an Ogg file. Testing here with SVN r17178, 5000 seeks within a 10GB Ogg file constructed by concatenating 22 short Ogg videos of varying bitrates together results in 17459 actual seek system calls. This yields a result of just under 3.5 real seeks per Ogg seek request when doing exact positioning within an Ogg file. Most actual seeking within an Ogg file would be more appropriately implemented by scrubbing with a single physical seek.

    And there you go. I don't know WTF is wrong with your players, but really, how can a total of four seeks bring your system to a crawl?

    --
    Don't thank God, thank a doctor!
  19. Re:tl;dr by Anpheus · · Score: 4, Informative

    Ah, the gotcha is in the source:

    http://svn.xiph.org/trunk/vorbis-tools/ogginfo/ogginfo2.c

    Ogginfo's source includes information on how to process the metadata for various codecs.

    So, the grandparent's complaint is still valid. Ogginfo appears to require recompilation for every stream that they want to support inside an ogg container.

  20. Re:Does MPEG-TS have indexes? by Wumpus · · Score: 3, Informative

    A DVD is MPEG-PS, not MPEG-TS. Your cable system and satellite feed are TS. Both are built on top of the PES layer.

    MPEG-2 is the reason I have no hair left on my head.