{"id":3439,"date":"2013-06-17T18:27:17","date_gmt":"2013-06-17T15:27:17","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=3439"},"modified":"2013-06-17T21:50:34","modified_gmt":"2013-06-17T18:50:34","slug":"more-transcoding-notes-libvpx","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2013\/06\/17\/more-transcoding-notes-libvpx\/","title":{"rendered":"More transcoding notes: libvpx"},"content":{"rendered":"<p>As I wrote at the end of <a href=\"http:\/\/mummila.net\/nuudelisoppa\/2013\/06\/16\/video-transcoding-notes\/\">the previous post<\/a>, the second pass may fail with \u201cApplication provided invalid, non monotonically increasing dts to muxer in stream 0\u2033 when <code>auto-alt-ref=1<\/code> is used. The VP8 Parameter Guide now tells me that <a href=\"http:\/\/www.webmproject.org\/docs\/encoder-parameters\/#5-the-alternate-or-constructed-reference-frame\"><code>lag-in-frames<\/code> depends on <code>auto-alt-ref<\/code> being enabled<\/a>. Specifying <code>lag-in-frames<\/code> when using 2 passes therefore apparently won&#8217;t do any good (not as long as avconv chokes on <code>auto-alt-ref=1<\/code>). Additionally, <code>auto-alt-ref<\/code> is (&#8220;currently&#8221;) only available in 2 pass mode, so it&#8217;s a catch-22.<\/p>\n<p>The <code>arnr-*<\/code> parameters are an alternative reference frame construction kit (alternative for <code>auto-alt-ref<\/code> + <code>lag-in-frames<\/code>), but <code>auto-alt-ref<\/code> can, according to the guide, &#8220;substantially improve quality in many situations (though there are still a few where it may hurt)&#8221; whereas <code>arnr-*<\/code> filtering is considered experimental and is disabled by default. Additionally, <code>arnr-type<\/code> is unsupported. All libvpx preset files provided with avconv currently have <code>arnr-maxframes=7<\/code>, <code>arnr-strength=5<\/code> and <code>arnr-type=centered<\/code>.<\/p>\n<p>The <code>deadline<\/code> parameter&#8217;s options <code>best<\/code>, <code>good<\/code> and <code>realtime<\/code> apparently translate to quality at the cost of speed, with &#8220;best&#8221; being &#8220;best quality, slowest to encode&#8221; and &#8220;not a recommended setting unless you have a lot of time on your hands.&#8221; The &#8220;good&#8221; option can be further tweaked with the <code>cpu-used<\/code> option: with <code>cpu-used=0<\/code>, quality will be &#8220;very close to and even sometimes better than&#8221; with <code>deadline=best<\/code>, but typically twice as fast. Bigger values of <code>cpu-used<\/code> (1-5) each translate to more encoding speed than the previous, but with equally noticeable impact on quality.<\/p>\n<p>For <code>slices<\/code>, the ffmpeg wiki recommends &#8220;<a href=\"http:\/\/wiki.webmproject.org\/ffmpeg#sites-canvas-main-content\">1 for small images, 4 or 8 for HD<\/a>&#8220;. The aforementioned presets have 4 for 720p and 1080p, and no setting (probably meaning <code>slices=1<\/code>) for 360p.<\/p>\n<p>For non-zero values of <code>profile<\/code>, the encoder increasingly optimizes low powered devices at the expense of quality.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I wrote at the end of the previous post, the second pass may fail with \u201cApplication provided invalid, non monotonically increasing dts to muxer in stream 0\u2033 when auto-alt-ref=1 is used. The VP8 Parameter Guide now tells me that lag-in-frames depends on auto-alt-ref being enabled. Specifying lag-in-frames when using 2 passes therefore apparently won&#8217;t [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3439","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=3439"}],"version-history":[{"count":9,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3439\/revisions"}],"predecessor-version":[{"id":3448,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3439\/revisions\/3448"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=3439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=3439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=3439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}