Linux – How to install libav-tools in centos 6

centoslibavlinux

I used tutorial to compile it from source but it never worked for me.
I am facing error on following points

Download x264 codec and compile it:

git clone git://git.videolan.org/x264.git x264
cd x264
./configure –enable-static
make && make install

error log:

 cd x264
     ./configure –enable-static
    Unknown option –enable-static, ignored
    Found no assembler
    Minimum version is yasm-1.2.0
    If you really want to compile without asm, configure with --disable-asm.
      make && make install
    Makefile:3: config.mak: No such file or directory
    ./configure
    Found no assembler
    Minimum version is yasm-1.2.0
    If you really want to compile without asm, configure with --disable-asm.
    make: *** [config.mak] Error 1

and

cd libav
./configure --enable-gpl --enable-nonfree
make && make install

error log:

 cd libav
./configure --enable-gpl --enable-nonfree
Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
libav-tools@libav.org mailing list or IRC #libav on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
  make && make install
Makefile:1: config.mak: No such file or directory
Makefile:99: /common.mak: No such file or directory
Makefile:137: /libavutil/Makefile: No such file or directory
Makefile:137: /library.mak: No such file or directory
Makefile:139: /doc/Makefile: No such file or directory
Makefile:214: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'.  Stop.

Reference Link:
http://blog.droidzone.in/2013/12/24/convert-a-wmv-file-to-avi-on-the-linux-command-line/


I installed using these but still i am facing issues

wget https://www.libav.org/releases/libav-10.5.tar.gz
tar xf libav-10.5.tar.gz
TMPDIR=/home/sociaow2/tmp/avco/libav-10.5 ./configure
make && make install
cd

All libs installed now when i enter that command

 avconv -i state.mp4  -r 20 -s 480x352 -b 600k  -vcodec libx264 out_state.mp4

Unknown encoder 'libx264'
on command

  avconv -i state.mp4  -r 20 -s 480x352 -b 600k  -vcodec libx264 out_state.mp4

Unknown encoder 'libmp3lame'
on command

 avconv -i state.mp4  -r 20 -s 480x352 -b 600k  -vcodec libx264 out_state.mp4

Best Answer

You are probably missing --enable-libx264 from your configure line and your server is configured disabling executing in /tmp I suggest you to do something like

mkdir ~/tmp export TMPDIR=~/tmp ./configure --enable-gnu --enable-libx264

(further info here)

Installing yasm is required by x264 as stated above.

Make sure you have /usr/local/bin in your PATH since you are installing yasm, x264 and libav there.