1. 16
  1.  

  2. 11

    The creator of Ogg responded to this post.

    1. 4

      That was a much better read than the objections, thanks for posting it!

    2. 11

      One time I tried to write an Ogg parser just for educational purposes. Where most “container” formats are like Tupperware (put your thing inside, put the lid on, write a label on the top with a whiteboard marker), Ogg is like Lego: it doesn’t actually contain anything, it’s just a design pattern that makes it easy to combine with other things that follow the same design pattern, like how Lego bricks can be stuck together.

      So far as I could make out, the Xiph policy was that if you wanted to decode (say) a Vorbis stream, you’d need Vorbis-specific code anyway, so it was OK if every codec stored its metadata completely differently. Conversely, if you encountered a stream you didn’t recognise, you wouldn’t be able to do anything with it anyway, so what did it matter if you couldn’t identify it?

      There’s definitely a logic there, but I feel like that’s a design with some pretty frustrating failure modes from an end-user point of view.

      1. 3

        So far as I could make out, the Xiph policy was that if you wanted to decode (say) a Vorbis stream, you’d need Vorbis-specific code anyway, so it was OK if every codec stored its metadata completely differently. Conversely, if you encountered a stream you didn’t recognise, you wouldn’t be able to do anything with it anyway, so what did it matter if you couldn’t identify it?

        My counter to that would be that not every tool that deals with metadata also handles the data. If I want to do decent searching on my filesystem, I need to be able to extract metadata from every file, but I won’t be trying to open a Word document or play an audio file with my metadata indexer. I want my file manager to show me metadata about music files when I click on them, even if I need to double-click on them and open them in an external application to actually play them. It is a lot easier if all of the data that is common to a format (e.g. title, author, length in some unit, number of video / audio streams, and so on) is in a single format. With most container formats, I can quite easily write a tool that extracts this information from any file in that format, irrespective of the CODECs used (my favourite example of this was on BeOS, where a tool could extract info from container formats and store the same information in searchable and filterable filesystem metadata [though with the down side that it was stored in two places and could become out of sync]). From what you’re saying, it sounds like this is not the case for Ogg.

      2. 6

        I don’t know a whole lot about this, but as someone who obsesses about meaningless details… Anyone know of good alternative container formats for audio? Seems like MKV and MP4 are both reasonable choices for video, do they work for audio as well?

        1. 4

          MKA is just MKV but with only audio bistreams. It’s good but closed source support varies. If you have AAC or FLAC they should go into their native containers. For Opus it depends on the usecase.

          1. 2

            MP4 audio is extremely common—it’s the standard iTunes container for music files.

            As far as I know, audio-only Matroska is rare. Everyone uses MP4 for AAC, and OGG for Vorbis.

            1. 1

              MP4 audio is extremely common—it’s the standard iTunes container for music files.

              There’s a very good reason for this. Apple owned patents on the QuickTime Movie format and so pushed hard to have this format (renamed and slightly tweaked) become part of the MPEG-4 standard. If you look at the list of patents that MPEG-LA put in the MPEG-4 bundle, that is the only one from Apple, but if you have at least one patent in the umbrella then you get much better terms from the license. Apple then had a very strong incentive to ensure that people actually used that container format and it didn’t end up being pulled into a separately licensable component.

              1. 1

                Yep. It’s also an excellent format, but that’s largely an accident of history.

            2. 1

              I’ve switched to using opus for all my audio when I don’t have room for flacs. when I researched it a while ago it had a lot of advantages that I can’t remember offhand

              1. 1

                I’d just use MPEG-4 part 14, and be done with it.

              2. 1

                Embedded art for ogg vorbis is also a mess.

                1. 1

                  I’d honestly entirely forgotten about Ogg. Is it still a thing in a meaningful sense, what with the MP3 patents having expired?

                  1. 6

                    Ogg is a container format, able to hold different codecs inside, Vorbis is the codec designed to replace MP3. Now Ogg is being used with the Opus codec, with quite success.

                    1. 3

                      Ugh, I thought that Opus had its own container format/was using MKV already …

                      Tried to parse Ogg once, wouldn’t recommend.

                    2. 6

                      Spotify uses ogg vorbis for streaming to their apps: https://en.wikipedia.org/wiki/Spotify#Technical_information

                      1. 5

                        Ogg vorbis file size pretty regularly beat out vbr mp3’s at the max setting I could distinguish in a blind listening test. If a lossless source is available I always prefer encoding vorbis myself for use on my own (non internet) music player! The criticisms of the Ogg container make sense though. I’ve never really seen Vorbis in any other container tbh.

                        1. 3

                          Old-style WebM files used Vorbis in a Matroska container.