{"id":445,"date":"2007-07-05T16:25:14","date_gmt":"2007-07-05T23:25:14","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/"},"modified":"2007-07-05T17:46:42","modified_gmt":"2007-07-06T00:46:42","slug":"playing-nicely-with-containers","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/","title":{"rendered":"Playing Nicely With Containers"},"content":{"rendered":"<p>As of this writing, there are <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Category:Lossless_Audio_Codecs\">25 lossless audio coding<\/a> (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that&#8217;s not enough because an <strike>audiophile friend<\/strike> electrical engineer with a solid DSP background (amended per the audiophile&#8217;s suggestion) just communicated the news that he is working on a new algorithm. <\/p>\n<p>In particular, he was seeking advice about how to make the codec container-friendly. A pet peeve toward many available LACs is that their designers have historically insisted upon creating custom container formats for storing the compressed data.<\/p>\n<blockquote><p>\n<em>Aside:<\/em> The uninitiated might be wondering why this custom container characteristic irks us multimedia veterans so. Maybe it&#8217;s just best to solve one problem at a time: if you want to create a new codec format, work on that. Don&#8217;t bother creating a container to store it at the same time. That&#8217;s a different problem domain entirely. If you tackle the container problem, you&#8217;re likely to make a bunch of common rookie mistakes that will only earn the scorn of open source multimedia hackers who would otherwise like to support your format.\n<\/p><\/blockquote>\n<p>My simple advice for him is to design the codec so that each compressed chunk decompresses to a constant number of samples for a given file. Per my recollection, this is a problem with Vorbis that causes difficulty when embedding it inside of general purpose container formats&#8211; a given file can have 2 decoded chunk sizes, e.g., 512 and 8192 samples (I&#8217;m sure someone will correct me if I have that fact mixed up). Also, try not to have &#8220;too much&#8221; out-of-band initialization data, a.k.a. &#8220;extradata&#8221;. How much is too much? I&#8217;m not sure, but I know that there are some limitations somewhere. Again, this is a problem with those saviors of open source multimedia, Vorbis audio and Theora video. Both codecs use the container extradata section to transmit all the entropy models and data tables because the codec designers were unwilling to make hard decisions in the design phase. <em>(Okay, maybe it would be more polite to state that Vorbis and Theora are transparent and democratic in their approach to entropy and quantization models by allowing the user the freedom to choose the most suitable model.)<\/em><\/p>\n<p>No OOB setup extradata is ideal, of course. What about the most basic parameters such as sample rate, sample resolution, channel count, decoded block size? Any half-decent general-purpose container format has all that data and more encoded in a standard audio header. This includes AVI, ASF, QuickTime, WAV, and AIFF, at the very least. Perceptual audio codecs like <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Windows_Media_Audio\">Windows Media Audio<\/a> and <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=QDesign_Music_Codec\">QDesign Music Codec<\/a> get by with just a few bytes of extradata.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that&#8217;s not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile&#8217;s suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-open-source-multimedia"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that&#039;s not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile&#039;s suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Playing Nicely With Containers | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that&#039;s not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile&#039;s suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-07-05T23:25:14+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2007-07-06T00:46:42+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Playing Nicely With Containers | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that&#039;s not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile&#039;s suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#article\",\"name\":\"Playing Nicely With Containers | Breaking Eggs And Making Omelettes\",\"headline\":\"Playing Nicely With Containers\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"datePublished\":\"2007-07-05T16:25:14-07:00\",\"dateModified\":\"2007-07-05T17:46:42-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#webpage\"},\"articleSection\":\"Open Source Multimedia\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/#listItem\",\"name\":\"Open Source Multimedia\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/#listItem\",\"position\":2,\"name\":\"Open Source Multimedia\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#listItem\",\"name\":\"Playing Nicely With Containers\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#listItem\",\"position\":3,\"name\":\"Playing Nicely With Containers\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/#listItem\",\"name\":\"Open Source Multimedia\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/\",\"name\":\"Playing Nicely With Containers | Breaking Eggs And Making Omelettes\",\"description\":\"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that's not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile's suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/playing-nicely-with-containers\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2007-07-05T16:25:14-07:00\",\"dateModified\":\"2007-07-05T17:46:42-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Playing Nicely With Containers | Breaking Eggs And Making Omelettes","description":"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that's not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile's suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about","canonical_url":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#article","name":"Playing Nicely With Containers | Breaking Eggs And Making Omelettes","headline":"Playing Nicely With Containers","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"datePublished":"2007-07-05T16:25:14-07:00","dateModified":"2007-07-05T17:46:42-07:00","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#webpage"},"articleSection":"Open Source Multimedia"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/#listItem","name":"Open Source Multimedia"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/#listItem","position":2,"name":"Open Source Multimedia","item":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#listItem","name":"Playing Nicely With Containers"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#listItem","position":3,"name":"Playing Nicely With Containers","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/#listItem","name":"Open Source Multimedia"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/","name":"Playing Nicely With Containers | Breaking Eggs And Making Omelettes","description":"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that's not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile's suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2007-07-05T16:25:14-07:00","dateModified":"2007-07-05T17:46:42-07:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"Playing Nicely With Containers | Breaking Eggs And Making Omelettes","og:description":"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that's not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile's suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about","og:url":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/","article:published_time":"2007-07-05T23:25:14+00:00","article:modified_time":"2007-07-06T00:46:42+00:00","twitter:card":"summary","twitter:title":"Playing Nicely With Containers | Breaking Eggs And Making Omelettes","twitter:description":"As of this writing, there are 25 lossless audio coding (LACs) algorithms cataloged in the MultimediaWiki. Apparently, that's not enough because an audiophile friend electrical engineer with a solid DSP background (amended per the audiophile's suggestion) just communicated the news that he is working on a new algorithm. In particular, he was seeking advice about"},"aioseo_meta_data":{"post_id":"445","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 21:55:32","updated":"2025-12-31 18:45:31","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/\" title=\"Open Source Multimedia\">Open Source Multimedia<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPlaying Nicely With Containers\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Open Source Multimedia","link":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/"},{"label":"Playing Nicely With Containers","link":"https:\/\/multimedia.cx\/eggs\/playing-nicely-with-containers\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}