Page 1 of 2 12 LastLast
Results 1 to 10 of 2402

Thread: HOWTO: Install and use the latest FFmpeg and x264

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Beans
    3,713

    Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10

    Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10

    Karmic is unsupported and this guide will not be updated.

    Get the Dependencies
    1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:
    Code:
    sudo apt-get remove ffmpeg x264 libx264-dev
    2. Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories):
    Code:
    sudo apt-get update
    sudo apt-get install build-essential git-core checkinstall yasm texi2html libfaac-dev \
        libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev \
        libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev

    Install x264
    3. Get the current source files, compile, and install x264.
    Code:
    cd
    git clone git://git.videolan.org/x264
    cd x264
    ./configure --enable-static
    make
    sudo checkinstall --pkgname=x264 --pkgversion="1:0.svn$(date +%Y%m%d)+$(git rev-list \
        HEAD -n 1 | head -c 7)" --backup=no --deldoc=yes --default

    Install libvpx (optional)
    4. This is used to encode and decode VP8 video. Add --enable-libvpx to the ./configure line in step 7 if you decide to install libvpx:
    Code:
    cd
    git clone git://review.webmproject.org/libvpx
    cd libvpx
    ./configure
    make
    sudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
        --deldoc=yes --default

    Install libtheora (optional)
    5. This is used to encode to Theora, the video type usually found in OGG/OGV files. The repository libtheora is too old, so it must be compiled. Add --enable-libtheora to the ./configure line in step 7 if you decide to install libtheora.
    Code:
    sudo apt-get install libogg-dev
    cd
    wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
    tar xzvf libtheora-1.1.1.tar.gz
    cd libtheora-1.1.1
    ./configure --disable-shared
    make
    sudo checkinstall --pkgname=libtheora --pkgversion="1.1.1" --backup=no --deldoc=yes \
        --default

    Install LAME (optional)
    6. This is used to encode to mp3 audio. Once again, the repository version is too old. Add --enable-libmp3lame to the ./configure line in step 7 if you decide to install LAME:
    Code:
    sudo apt-get remove libmp3lame-dev
    cd
    wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
    tar xzvf lame-3.98.4.tar.gz
    cd lame-3.98.4
    ./configure --disable-shared
    make
    sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --deldoc=yes \
        --default

    Install FFmpeg
    7. Get the most current source files, compile, and install FFmpeg.
    Code:
    cd
    git clone git://git.videolan.org/ffmpeg
    cd ffmpeg
    ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
        --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
        --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
    make
    sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
        --deldoc=yes --default
    
    hash x264 ffmpeg ffplay ffprobe ffserver
    That's it for installation. You can keep the ~/x264 and ~/ffmpeg directories if you later want to update the source files to a new revision. See "Updating Your Installation" on the first page of this guide for more details.

    Now head back to the FFmpeg guide for usage instructions and more.

    Reverting Changes Made by This Guide
    To remove FFmpeg/x264 and other packages added for this guide:
    Code:
    sudo apt-get autoremove x264 ffmpeg build-essential git-core checkinstall yasm \
        texi2html libfaac-dev lame-ffmpeg libogg-dev libsdl1.2-dev libtheora libvorbis-dev \
        libvpx libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
    Lastly, delete the ffmpeg, libtheora, libvpx, lame-3.98.4, and x264 directories in your home folder.
    Last edited by FakeOutdoorsman; October 18th, 2011 at 08:56 PM.

  2. #2
    Join Date
    Nov 2007
    Beans
    465

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Thanks for the guide; helped me a lot.

    Charlie

  3. #3
    Join Date
    Dec 2008
    Beans
    2

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Hi, i'm on Lucid Lynx x64, after a successful make, I was checkinstall ffmpeg and I've got this error message:
    "dpkg-deb - erreur*: version (amont) («*SVN-r*») ne contient pas de chiffres
    dpkg-deb: 1 erreurs dans le fichier de contrôle"
    in inglish: dpkg-deb - error*: version (amont) («*SVN-r*») doesn't containt digit
    dpkg-deb: 1 errors in the control file


    Thanks for your help

  4. #4
    Join Date
    Sep 2006
    Beans
    3,713

    Re: HOWTO: Install and use the latest FFmpeg and x264

    darkeclypse,
    Quote Originally Posted by darkeclypse View Post
    Hi, i'm on Lucid Lynx x64, after a successful make, I was checkinstall ffmpeg and I've got this error message:
    "dpkg-deb - erreur*: version (amont) («*SVN-r*») ne contient pas de chiffres
    dpkg-deb: 1 erreurs dans le fichier de contrôle"
    in inglish: dpkg-deb - error*: version (amont) («*SVN-r*») doesn't containt digit
    dpkg-deb: 1 errors in the control file


    Thanks for your help
    It worked for me. Are you using a nightly FFmpeg snapshot instead of subversion? You can get the current FFmpeg source files with subversion as shown in this guide:
    Code:
    svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
    or you can download a nightly FFmpeg snapshot. Some users may prefer using snapshots, but I did not test the checkinstall command on this method. Here is a new checkinstall command for you to try:
    Code:
    sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default
    I'm not sure why the original checkinstall command didn't work for you. Is anyone else having trouble with the checkinstall command on the first page of this guide?


    prupert,
    Quote Originally Posted by prupert View Post
    Hi

    I have used your excellent script on numerous occasions for various machines. To make it easier, I have created a script that runs all this for me automatically. There are two scripts, one for the first time I use your method for installing ffmpeg and then another to update to the latest version (with, if I can get it to work, a list of the new revisions from SVN can't seem to get that info from git yet).
    Perhaps can use the svn log to see new updates. This example will show you the last 12 revisions:
    Code:
    svn log -l 12 svn://svn.mplayerhq.hu/ffmpeg/trunk
    You could also display these entries by date or revision number.

    Quote Originally Posted by prupert View Post
    I was hoping to make this script public on my website and also on Google code, but as the majority of it comes from your excellent post (I just wrapped it in some not-so-clever bash goodness) I wanted to check that this would be ok with you first.

    The script does acknowledge that I took the commands from you and gives your name and the link to this thread...

    So, is it ok if I post my script on google code and on my website?

    Cheers
    Yes, of course. Thanks for asking. Can you share the link to your web site when you are finished?

  5. #5
    Join Date
    May 2007
    Beans
    10

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Thank you for your tutorial.

    Now ps3mediaserver can transcode much more of my media than before.

    Thank you

  6. #6
    Join Date
    Dec 2008
    Beans
    2

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    darkeclypse,


    It worked for me. Are you using a nightly FFmpeg snapshot instead of subversion? You can get the current FFmpeg source files with subversion as shown in this guide:
    Code:
    svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
    or you can download a nightly FFmpeg snapshot. Some users may prefer using snapshots, but I did not test the checkinstall command on this method. Here is a new checkinstall command for you to try:
    Code:
    sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default
    I'm not sure why the original checkinstall command didn't work for you. Is anyone else having trouble with the checkinstall command on the first page of this guide?
    The command "sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default" worked for me.
    It seems like it is "`svn info | grep Revision | awk '{ print $NF }'`" that made the problem.

    Thanks anyway

  7. #7
    Join Date
    Jul 2010
    Beans
    1

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by darkeclypse View Post
    The command "sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default" worked for me.
    It seems like it is "`svn info | grep Revision | awk '{ print $NF }'`" that made the problem.

    Thanks anyway
    Hello i got the same problem... change "grep Revision" to "grep Révision"... because we are french we have somme anoying accent...



    sorry for my poor english

  8. #8
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,638
    Distro
    Ubuntu

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Do you happen to know how to do this easily on a minimal install without it wanting to pull X in?

    Full ffmpeg, no X?

  9. #9
    Join Date
    Jul 2010
    Beans
    4

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by flyone View Post
    Hello i got the same problem... change "grep Revision" to "grep Révision"... because we are french we have somme anoying accent...



    sorry for my poor english
    You can do it before compiling:
    http://ubuntuforums.org/showpost.php...postcount=1109
    Then all svn messages will be in English.

  10. #10
    Join Date
    Dec 2006
    Beans
    7,316

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Hi flyone,

    Quote Originally Posted by flyone View Post
    Hello i got the same problem... change "grep Revision" to "grep Révision"... because we are french we have somme anoying accent...
    I love fiddling with these things:

    Code:
    svn info | sed '5!d' | awk '{ print $NF }'
    Would always work unless the number of lines changed, reasonably unlikely... A variation:

    Code:
    svn info | sed -e '5!d' -e 's/^.\{10\}//'
    Andrew
    Last edited by andrew.46; July 11th, 2010 at 10:49 AM.
    You think that's air you're breathing now?

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •