Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I install avconv on OS X?

share|improve this question

closed as not a real question by Canadian Luke, Nifle, CharlieRB, oKtosiTe, Dave M Mar 19 '13 at 21:18

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer

up vote 7 down vote accepted

First grab the library:

 wget http://libav.org/releases/libav-10.1.tar.gz
# use http://libav.org/releases/libav-snapshot.tar.bz2 for the latest snapshot
tar -xvzf libav-10.1.tar.gz 
cd libav-10.1

Set up the dependencies with MacPorts (or other package managers such as Homebrew):

sudo port install yasm zlib bzip2 faac lame speex libogg libvorbis libtheora libvpx x264 XviD openjpeg15 opencore-amr freetype

Build libav:

./configure \
--extra-cflags=-I/opt/local/include --extra-ldflags=-L/opt/local/lib \
--enable-gpl --enable-libx264 --enable-libxvid \
--enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-nonfree --enable-libfaac \
--enable-libmp3lame --enable-libspeex --enable-libvorbis --enable-libtheora --enable-libvpx \
--enable-libopenjpeg --enable-libfreetype --enable-doc --enable-gnutls --enable-shared

make && sudo make install

Then you can run avconv:

avconv -i input.avi -c:v libx264 -preset slow -crf 18 output.mp4

  • x264 +asm seems to be required to get working cpu-capabilities, so if you don't get them (ie. [libx264 @ 0x7fe66101a800] using cpu capabilities: none!) run:

sudo port upgrade --enforce-variants x264 +asm

You should get sth like: [libx264 @ 0x7fc62401b600] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX

share|improve this answer
    
Your last example is quite special and probably doesn't suit a typical encoding task. –  slhck Mar 19 '13 at 18:04
    
I've seen you've removed x264 +asm However, without it you don't get cpu-capabilities. –  Olivier Mar 19 '13 at 18:28
    
Oh, this must've been a port oddity, sorry. I thought it was a typo of yasm :) –  slhck Mar 19 '13 at 18:43
    
What is funny is that yasm was also required to build & forgotten! –  Olivier Mar 19 '13 at 18:58
1  
On Mac OSX, dependencies installed via MacPorts and using pkg-config are not found until you set environment variable export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig'. Also, for the fun of it, you may add, to ./configure`, options: --extra-cflags=-I/opt/local/include --extra-ldflags=-L/opt/local/lib. Then the whole ./configure above miraculously passes! –  Alexy Jul 16 '13 at 17:30
show 1 more comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.