{"id":2561,"date":"2010-06-17T21:55:36","date_gmt":"2010-06-18T04:55:36","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=2561"},"modified":"2010-06-17T22:04:06","modified_gmt":"2010-06-18T05:04:06","slug":"libvpx-0-9-1-and-ffmpeg-0-6","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/libvpx-0-9-1-and-ffmpeg-0-6\/","title":{"rendered":"libvpx 0.9.1 and FFmpeg 0.6"},"content":{"rendered":"<p>Great news: Hot on the heels of <a href=\"http:\/\/multimedia.cx\/eggs\/ffmpeg-0-6-something-about-html5\/\">FFmpeg&#8217;s 0.6 release<\/a>, <a href=\"http:\/\/www.webmproject.org\/\">the WebM project<\/a> released version 0.9.1 of their libvpx. I can finally obsolete <a href=\"http:\/\/multimedia.cx\/eggs\/vp8-and-ffmpeg\/\">my last set of instructions<\/a> on getting FFmpeg-svn working with libvpx 0.9.<\/p>\n<p><strong>Building libvpx 0.9.1<\/strong><br \/>\nDo this to build libvpx 0.9.1 on Unix-like systems:<\/p>\n<ul>\n<li>Download libvpx 0.9.1 from <a href=\"http:\/\/code.google.com\/p\/webm\/downloads\/list\">http:\/\/code.google.com\/p\/webm\/downloads\/list<\/a><\/li>\n<li>Unpack, chdir to the source dir, &#8216;.\/configure &#038;&#038; make &#038;&#038; make install&#8217;<\/li>\n<\/ul>\n<p>libvpx&#8217;s build system has been firmed up a bit since version 0.9. It&#8217;s now smart enough to install when said target is invoked and it also builds the assembly language optimizations. Be advised that on 32- and 64-bit x86 machines, <a href=\"http:\/\/www.tortall.net\/projects\/yasm\/\">Yasm<\/a> must be present (install either from source or through your package manager).<\/p>\n<p><strong>Building FFmpeg 0.6<\/strong><br \/>\nTo build the newly-released FFmpeg 0.6:<\/p>\n<ul>\n<li>Install Vorbis through your package manager if you care to encode WebM files with audio; e.g., &#8216;libvorbis-dev&#8217; is the package you want on Ubuntu<\/li>\n<li>Download FFmpeg 0.6 from <a href=\"http:\/\/ffmpeg.org\/download.html\">the project&#8217;s download page<\/a><\/li>\n<li>Configure FFmpeg with at least these options: <code>.\/configure --enable-libvpx --enable-libvorbis --enable-pthreads<\/code>; the final link step still seems to fail on Linux if the pthreads option is disabled<\/li>\n<li>&#8216;make&#8217;<\/li>\n<\/ul>\n<p><strong>Verifying<\/strong><br \/>\nCheck this out:<\/p>\n<pre>\r\n$ .\/ffmpeg -formats 2> \/dev\/null | grep WebM\r\n  E webm            WebM file format\r\n\r\n$ .\/ffmpeg -codecs 2> \/dev\/null | grep libvpx\r\n DEV    libvpx          libvpx VP8\r\n<\/pre>\n<p>That means that this FFmpeg binary can mux a WebM file and can both decode and encode VP8 video via libvpx. If you&#8217;re wondering why the WebM format does not list a &#8216;D&#8217; indicating the ability to demux a WebM file, that&#8217;s because demuxing WebM is handled by the general Matroska demuxer.<\/p>\n<p><strong>Doing Work<\/strong><br \/>\nEncode a WebM file:<\/p>\n<p><code>ffmpeg -i &lt;input_file&gt; &lt;output_file.webm&gt;<\/code><\/p>\n<p>FFmpeg just does the right thing when it seems that .webm extension on the output file. It&#8217;s almost magical.<\/p>\n<p>For instant gratification that the encoded file is valid, you can view it immediately using &#8216;ffplay&#8217;, if that binary was built (done by default if the right support libraries are present). If ffplay is not present, you can always execute this command line to see <em>some<\/em> decode operation:<\/p>\n<p><code>ffmpeg -i &lt;output_file.webm&gt; -f framecrc -<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>libvpx 0.9.1 is out and it works beautifully with FFmpeg 0.6; here&#8217;s how to build it all<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[219],"tags":[],"class_list":["post-2561","post","type-post","status-publish","format-standard","hentry","category-vp8"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2561","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=2561"}],"version-history":[{"count":8,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2561\/revisions"}],"predecessor-version":[{"id":2570,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2561\/revisions\/2570"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=2561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=2561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=2561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}