{"id":2891,"date":"2010-09-11T21:40:45","date_gmt":"2010-09-12T04:40:45","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=2891"},"modified":"2010-09-11T22:29:04","modified_gmt":"2010-09-12T05:29:04","slug":"naive-svq1-encoder","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/","title":{"rendered":"Naive Sorenson Video 1 Encoder"},"content":{"rendered":"<p><em>(Yes, the word is &#8220;naive&#8221; &#8212; or rather, &#8220;na\u00efve&#8221; &#8212; not &#8220;native&#8221;. People always try to correct me when I use the word. Indeed, it should actually be written with 2 dots over the &#8216;i&#8217; but who has a keyboard that can easily do that?)<\/em><\/p>\n<p>At the most primitive level, programming a video encoder is about writing out a sequence of bits that the corresponding video decoder will understand. It&#8217;s sort of like creating a program &#8212; represented as a stream of opcodes &#8212; that will run on a given microprocessor or virtual machine. In fact, reading a video codec bitstream specification will reveal a lot of terminology along the lines of &#8220;transmitting information to the decoder&#8221; or &#8220;signaling the decoder to do <em>xyz<\/em>.&#8221;<\/p>\n<p>Creating <strong>a good encoder<\/strong> that will deliver decent quality at a reasonable bitrate is difficult. Creating <strong>a naive encoder<\/strong> that produces a technically compliant bitstream, not so much.<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-title.jpg\" alt=\"\" title=\"Big Buck Bunny title\" width=\"400\" height=\"225\" class=\"aligncenter size-full wp-image-2892\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-title.jpg 400w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-title-300x168.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><br \/>\n<\/center><\/p>\n<p>When I wrote an FFmpeg encoder for <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Sorenson_Video_1\">Sorenson Video 1 (SVQ1)<\/a>, the first step was to just create a minimally compliant bitstream. The coarsest encoding mode that SVQ1 allows is to encode the average (mean) of each 16&#215;16 block of samples. So I created an encoder that just encoded the mean of each block. Apple&#8217;s QuickTime Player was able to play the resulting video in all of its blocky glory. The result rather reminds me of the Super Nintendo&#8217;s mosaic effect.<\/p>\n<p>Level 5 blocks (mean-only 16&#215;16 encoding):<br \/>\n<center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-svq1-l5.png\" alt=\"\" title=\"Big Buck Bunny - blocky title\" width=\"400\" height=\"225\" class=\"aligncenter size-full wp-image-2893\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-svq1-l5.png 400w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-svq1-l5-300x168.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><br \/>\n<\/center><\/p>\n<p>Level 3 blocks (mean-only 8&#215;8 encoding):<br \/>\n<center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-svq1-l3.png\" alt=\"\" title=\"Big Buck Bunny title - still blocky, but finer resolution\" width=\"400\" height=\"225\" class=\"aligncenter size-full wp-image-2894\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-svq1-l3.png 400w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-svq1-l3-300x168.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><br \/>\n<\/center><\/p>\n<p>It&#8217;s one thing for your own decoder (in this case, FFmpeg&#8217;s own decoder) to be able to decode the data. The big test is whether the official decoder (in this case, Apple QuickTime Player) can decode the file.<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-qt-player.png\" alt=\"\" title=\"Playing in Apple QuickTime Player\" width=\"558\" height=\"349\" class=\"aligncenter size-full wp-image-2895\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-qt-player.png 558w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-qt-player-300x187.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><br \/>\n<\/center><\/p>\n<p>Now that&#8217;s a good feeling. After establishing that sort of baseline, it&#8217;s possible to adapt more and more features of the codec.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is how to start writing a video encoder<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2891","post","type-post","status-publish","format-standard","hentry","category-general"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"This is how to start writing a video encoder\" \/>\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\/naive-svq1-encoder\/\" \/>\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=\"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"This is how to start writing a video encoder\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-09-12T04:40:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2010-09-12T05:29:04+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This is how to start writing a video encoder\" \/>\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\\\/naive-svq1-encoder\\\/#article\",\"name\":\"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes\",\"headline\":\"Naive Sorenson Video 1 Encoder\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/wp-content\\\/uploads\\\/2010\\\/09\\\/bbb-title.jpg\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#articleImage\",\"width\":400,\"height\":225},\"datePublished\":\"2010-09-11T21:40:45-07:00\",\"dateModified\":\"2010-09-11T22:29:04-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":5,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#webpage\"},\"articleSection\":\"General\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#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\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/#listItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#listItem\",\"name\":\"Naive Sorenson Video 1 Encoder\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#listItem\",\"position\":3,\"name\":\"Naive Sorenson Video 1 Encoder\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}}]},{\"@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\\\/naive-svq1-encoder\\\/#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\\\/naive-svq1-encoder\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/\",\"name\":\"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes\",\"description\":\"This is how to start writing a video encoder\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/naive-svq1-encoder\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2010-09-11T21:40:45-07:00\",\"dateModified\":\"2010-09-11T22:29:04-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":"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes","description":"This is how to start writing a video encoder","canonical_url":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#article","name":"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes","headline":"Naive Sorenson Video 1 Encoder","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/09\/bbb-title.jpg","@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#articleImage","width":400,"height":225},"datePublished":"2010-09-11T21:40:45-07:00","dateModified":"2010-09-11T22:29:04-07:00","inLanguage":"en-US","commentCount":5,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#webpage"},"articleSection":"General"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#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\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/general\/#listItem","position":2,"name":"General","item":"https:\/\/multimedia.cx\/eggs\/category\/general\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#listItem","name":"Naive Sorenson Video 1 Encoder"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#listItem","position":3,"name":"Naive Sorenson Video 1 Encoder","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/general\/#listItem","name":"General"}}]},{"@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\/naive-svq1-encoder\/#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\/naive-svq1-encoder\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/","name":"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes","description":"This is how to start writing a video encoder","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2010-09-11T21:40:45-07:00","dateModified":"2010-09-11T22:29:04-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":"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes","og:description":"This is how to start writing a video encoder","og:url":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/","article:published_time":"2010-09-12T04:40:45+00:00","article:modified_time":"2010-09-12T05:29:04+00:00","twitter:card":"summary","twitter:title":"Naive Sorenson Video 1 Encoder | Breaking Eggs And Making Omelettes","twitter:description":"This is how to start writing a video encoder"},"aioseo_meta_data":{"post_id":"2891","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:51:43","updated":"2025-12-31 19:34:39","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\/general\/\" title=\"General\">General<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tNaive Sorenson Video 1 Encoder\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"General","link":"https:\/\/multimedia.cx\/eggs\/category\/general\/"},{"label":"Naive Sorenson Video 1 Encoder","link":"https:\/\/multimedia.cx\/eggs\/naive-svq1-encoder\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2891","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=2891"}],"version-history":[{"count":8,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2891\/revisions"}],"predecessor-version":[{"id":2903,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2891\/revisions\/2903"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=2891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=2891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=2891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}