12

Is there a step-by-step guide on how to compile avconv in Ubuntu?

It seems hard to search for any tutorial with avconv compared to ffmpeg.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kugutsumen
  • 600
  • 1
  • 6
  • 19

3 Answers3

19

I finally found out how,

1.) Make a directory avconv-source

mkdir avconv-source

2.) Download and install the x264 library

cd ~/avconv-source
git clone git://git.videolan.org/x264.git x264
cd x264
sudo ./configure --enable-static
sudo make
sudo make install

3.) Download the avconv source

cd ~/avconv-source
git clone git://git.libav.org/libav.git avconv
cd avconv
sudo ./configure
sudo ./configure --enable-gpl --enable-libx264
sudo make
sudo make install

and now you can execute

avconv -i test.mov -c:v libx264 -c:a copy test.mp4
JJD
  • 50,076
  • 60
  • 203
  • 339
Kugutsumen
  • 600
  • 1
  • 6
  • 19
  • When I run `sudo ./configure --enable-gpl --enable-libx264` I receive an error: `avconv-source/avconv/libavcodec/libx264.c:412: undefined reference to 'x264_encoder_open_125'` – JJD Aug 11 '12 at 22:11
  • 1
    @JJD you probably have two different versions of x264 installed simultaneously (this includes the libx264-dev package). Try setting LD_LIBRARY_PATH to the directory where libx264 is supposed to be, got this answer from http://stackoverflow.com/questions/11838456/undefined-reference-to-x264-encoder-open-125 – Kugutsumen Aug 20 '12 at 21:38
  • Thank you. I followed the guide on [how to install FFmpeg on Ubuntu Precise](http://delicious.com/redirect?url=http%3A//ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide) and it works for me somewhat. I use this command: `ffmpeg -i in.mts -vcodec libx264 -filter:v yadif -s hd1080 -ab 128k -strict -2 -threads 0 ./out_x264.mp4` – JJD Aug 21 '12 at 12:21
  • 2
    `configure` on `avconv` didn't work for me, I repeatedly got the error `ERROR: libx264 not found`. configuring `x264` with `./configure --enable-static --enable-shared --enable-pic` fixed it for me. – Luc van Donkersgoed Aug 14 '13 at 15:19
9

It worked great for me on Ubuntu 12.04, except that it complained that assembler was missing.

The minimum version is yasm-1.2.0. If you really want to compile without asm, configure with --disable-asm.

Thanks to HOWTO: Install and use the latest FFmpeg and x264, I did the following as well, and it was OK beyond that.

sudo apt-get install build-essential checkinstall

sudo apt-get build-dep yasm

wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz && \
tar -xf yasm-1.2.0.tar.gz && cd yasm-1.2.0 && ./configure

make

sudo checkinstall --pakdir "$HOME/Desktop" --pkgname yasm --pkgversion 1.2.0 \
--backup=no --default
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
fouwaaz
  • 121
  • 1
  • 3
9

This worked for me on Ubuntu 13.04 and Ubuntu 12.04.3 LTS.

apt-get install libavcodec-extra-53
PJunior
  • 2,649
  • 1
  • 33
  • 29
  • 3
    This is [`libavcodec-extra-54`](http://packages.ubuntu.com/trusty/libavcodec-extra-54) on Ubuntu 14.04. –  Sep 23 '14 at 20:09