{"id":641,"date":"2009-12-01T16:36:18","date_gmt":"2009-12-01T20:36:18","guid":{"rendered":"http:\/\/www.uvm.edu\/~waw\/blog\/?p=641"},"modified":"2009-12-01T16:36:18","modified_gmt":"2009-12-01T20:36:18","slug":"configure-and-install-ffmpeg","status":"publish","type":"post","link":"https:\/\/blog.uvm.edu\/waw\/2009\/12\/01\/configure-and-install-ffmpeg\/","title":{"rendered":"Configure and install ffmpeg"},"content":{"rendered":"<p>Get source code<\/p>\n<li>svn checkout svn:\/\/svn.ffmpeg.org\/ffmpeg\/trunk ffmpeg\n<\/li>\n<p>Needs libfaac&#8230;<br \/>\n<code><br \/>\n<\/code><\/p>\n<blockquote><p>wget http:\/\/downloads.sourceforge.net\/faac\/faac-1.28.tar.gz\n<\/p><\/blockquote>\n<p>hmmm&#8230; that seemed to require<\/p>\n<blockquote><p><code> yum install gcc-c++<br \/>\n<\/code>\n<\/p><\/blockquote>\n<p>to get g++ to work<\/p>\n<p>Also needs x264<br \/>\nBut x264 needs yasm&#8230;<\/p>\n<p>wget http:\/\/www.tortall.net\/projects\/yasm\/releases\/yasm-0.8.0.tar.gz<\/p>\n<p>OK, got yasm, now<br \/>\nwget ftp:\/\/ftp.videolan.org:21\/pub\/videolan\/x264\/snapshots\/x264-snapshot-20091130-2245.tar.bz2<\/p>\n<p>Be sure to .\/configure &#8211;enable-shared<\/p>\n<p>There was an issue using libx264.so.76 on another system I maintain, had to fall back on libx264.so.72 . errors like<\/p>\n<blockquote><p><code>In function `X264_init':<br \/>\n\/tmp\/ffmpeg\/libavcodec\/libx264.c:284: undefined reference to<br \/>\n`x264_encoder_open_79' <\/code><\/p><\/blockquote>\n<p>libx264.so.79 and ffmpeg from SVN seem to take care of that.<\/p>\n<p>OK, at last we con configure ffmpeg with<\/p>\n<blockquote><p><code>.\/configure --disable-ffplay --disable-demuxer=v4l_demuxer --enable-libx264 --enable-gpl --enable-shared --enable-libfaac --enable-nonfree<br \/>\n<\/code><\/p><\/blockquote>\n<p>Lastly, always need to set env<br \/>\nLD_LIBRARY_PATH=&#8217;\/usr\/local\/lib\/<\/p>\n<p>Now, we can type<\/p>\n<p><code>ffmpeg -y -i \/users\/w\/a\/waw\/red5\/webapps\/oflaDemo\/streams\/bob\/intro.flv -acodec libfaac -ab 96k -ar 44100 -vcodec libx264 -vpre hq -crf 22 -flags2 -bpyramid \/users\/w\/a\/waw\/red5\/webapps\/oflaDemo\/streams\/bob\/intro.mp4<\/code><\/p>\n<p>Oops &#8212; almost forgot. Also need to set working directory to ffmpeg\/tools and make qt-faststart , then copy qt-faststart to \/usr\/local\/bin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get source code svn checkout svn:\/\/svn.ffmpeg.org\/ffmpeg\/trunk ffmpeg Needs libfaac&#8230; wget http:\/\/downloads.sourceforge.net\/faac\/faac-1.28.tar.gz hmmm&#8230; that seemed to require yum install gcc-c++ to get g++ to work Also needs x264 But x264 needs yasm&#8230; wget http:\/\/www.tortall.net\/projects\/yasm\/releases\/yasm-0.8.0.tar.gz OK, got yasm, now wget ftp:\/\/ftp.videolan.org:21\/pub\/videolan\/x264\/snapshots\/x264-snapshot-20091130-2245.tar.bz2 Be &hellip; <a href=\"https:\/\/blog.uvm.edu\/waw\/2009\/12\/01\/configure-and-install-ffmpeg\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6517,8026,141],"tags":[],"class_list":["post-641","post","type-post","status-publish","format-standard","hentry","category-projects","category-systems-and-servers","category-video"],"_links":{"self":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/comments?post=641"}],"version-history":[{"count":5,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/641\/revisions"}],"predecessor-version":[{"id":649,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/641\/revisions\/649"}],"wp:attachment":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/media?parent=641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/categories?post=641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/tags?post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}