{"id":2457,"date":"2015-01-26T22:05:05","date_gmt":"2015-01-26T20:05:05","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=2457"},"modified":"2015-01-26T22:10:28","modified_gmt":"2015-01-26T20:10:28","slug":"install-latest-version-of-ffmpeg-and-its-dependencies-on-ubuntu-12-04-or-14-04","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=2457","title":{"rendered":"Install latest ffmpeg on ubuntu 12.04 or 14.04"},"content":{"rendered":"<p>We will install all the coders <strong>into opt folder<\/strong> :<\/p>\n<p><strong># Remove any existing packages:<\/strong><br \/>\nsudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev<\/p>\n<p><strong># Get the dependencies (Ubuntu Server or headless users):<\/strong><br \/>\nsudo apt-get update<br \/>\nsudo apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev \\<br \/>\nlibmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev \\<br \/>\nlibvorbis-dev pkg-config texi2html yasm zlib1g-dev<\/p>\n<p><strong># Install x264<\/strong><br \/>\nsudo apt-get -y install libx264-dev<br \/>\ncd \/opt<br \/>\ngit clone &#8211;depth 1 git:\/\/git.videolan.org\/x264<br \/>\ncd x264<br \/>\n.\/configure &#8211;enable-static<br \/>\nmake<br \/>\nsudo checkinstall &#8211;pkgname=x264 &#8211;pkgversion=&#8221;3:$(.\/version.sh | \\<br \/>\nawk -F'[&#8221; ]&#8217; &#8216;\/POINT\/{print $4&#8243;+git&#8221;$5}&#8217;)&#8221; &#8211;backup=no &#8211;deldoc=yes \\<br \/>\n&#8211;fstrans=no &#8211;default<\/p>\n<p><strong># Install AAC audio decoder<\/strong><br \/>\ncd \/opt<br \/>\nwget http:\/\/downloads.sourceforge.net\/opencore-amr\/fdk-aac-0.1.0.tar.gz<br \/>\ntar xzvf fdk-aac-0.1.0.tar.gz<br \/>\ncd fdk-aac-0.1.0<br \/>\n.\/configure<br \/>\nmake<br \/>\nsudo checkinstall &#8211;pkgname=fdk-aac &#8211;pkgversion=&#8221;0.1.0&#8243; &#8211;backup=no \\<br \/>\n&#8211;deldoc=yes &#8211;fstrans=no &#8211;default<\/p>\n<p><strong># Install VP8 video encoder and decoder \/ webmproject.org<\/strong><\/p>\n<p>cd \/opt<br \/>\ngit clone http:\/\/git.chromium.org\/webm\/libvpx.git<br \/>\ncd libvpx<br \/>\n.\/configure<br \/>\nmake<br \/>\n# make install<\/p>\n<p><strong># Add lavf support to x264<\/strong><br \/>\n# This allows x264 to accept just about any input that FFmpeg can handle and is useful if you want to use x264 directly. See a more detailed explanation of what this means.<br \/>\ncd ~\/x264<br \/>\nmake distclean<br \/>\n.\/configure &#8211;enable-static<br \/>\nmake<br \/>\nsudo checkinstall &#8211;pkgname=x264 &#8211;pkgversion=&#8221;3:$(.\/version.sh | \\<br \/>\nawk -F'[&#8221; ]&#8217; &#8216;\/POINT\/{print $4&#8243;+git&#8221;$5}&#8217;)&#8221; &#8211;backup=no &#8211;deldoc=yes \\<br \/>\n&#8211;fstrans=no &#8211;default<\/p>\n<p><strong># Installing FFmpeg<\/strong><br \/>\ncd \/opt<br \/>\ngit clone &#8211;depth 1 git:\/\/source.ffmpeg.org\/ffmpeg<br \/>\ncd ffmpeg<br \/>\n.\/configure &#8211;enable-gpl &#8211;enable-libfaac &#8211;enable-libmp3lame &#8211;enable-libopencore-amrnb \\<br \/>\n&#8211;enable-libopencore-amrwb &#8211;enable-librtmp &#8211;enable-libtheora &#8211;enable-libvorbis \\<br \/>\n&#8211;enable-libvpx &#8211;enable-libx264 &#8211;enable-nonfree &#8211;enable-version3<br \/>\nmake<br \/>\nsudo checkinstall &#8211;pkgname=ffmpeg &#8211;pkgversion=&#8221;5:$(date +%Y%m%d%H%M)-git&#8221; &#8211;backup=no \\<br \/>\n&#8211;deldoc=yes &#8211;fstrans=no &#8211;default<br \/>\nhash x264 ffmpeg ffplay ffprobe<\/p>\n<p><strong># Optional: install qt-faststart<\/strong><br \/>\n# This is a useful tool if you&#8217;re showing your H.264 in MP4 videos on the web. It relocates some data in the video to allow playback to begin before the file is completely downloaded. Usage: qt-faststart input.mp4 output.mp4.<br \/>\ncd \/opt\/ffmpeg<br \/>\nmake tools\/qt-faststart<br \/>\nsudo checkinstall &#8211;pkgname=qt-faststart &#8211;pkgversion=&#8221;$(date +%Y%m%d%H%M)-git&#8221; &#8211;backup=no \\<br \/>\n&#8211;deldoc=yes &#8211;fstrans=no &#8211;default install -Dm755 tools\/qt-faststart \\<br \/>\n\/usr\/local\/bin\/qt-faststart <\/p>\n","protected":false},"excerpt":{"rendered":"<p>We will install all the coders into opt folder : # Remove any existing packages: sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev # Get the dependencies (Ubuntu Server or headless users): sudo&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2843,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[328,209,14,327],"tags":[332],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/2457"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2457"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/2457\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2843"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}