seems Linux Mint 16 and Ubuntu current don't do libx264 with ffmpeg anymore. I have an old script from a few years ago that takes my recordings from Mythtv and converts them to the h264 format.

for file in *mpg

ffmpeg -y -i "$file" -threads 2 -vcodec libx264 -b 1024k -pass 1 -an -f mp4 /dev/null
ffmpeg -y -i "$file" -threads 2 -vcodec libx264 -b 1024k -pass 2 -acodec libvo_aacenc -ab 128k "$file".mp4


That has done me well for some time, but now the libx264 is not installed on my new system. Also, I am seeing they recommend avconv?? How can I get this script working again?


If you compile ffmpeg from source, you will be able to include libx264 support in your build configuration. You can either compile the library yourself (as recommended by FFmpeg) or install the libx264-dev package to get the headers you need.

Alternately, you can download a pre-compiled binary from one of the links on the site. I used those for a while, and I think they include libx264.

Regarding the avconv issue, there's a holy war between the two projects, and the package maintainer that makes most of the packages for Debian (and thus Ubuntu, and thus Mint) is on the libav side. The ffmpeg in the repositories is a re-branded avconv too. EDIT: or so I've heard.

EDIT2: You can find most of the relevant downloads and information at http://ffmpeg.org/download.html

  • Ok, so I installed libx264-dev but it still doesn't recognize libx264 (or libx264-dev) when I run my script. – user277244 Feb 3 '14 at 4:14
  • Those are the development headers for compiling ffmpeg with the --enable-libx264 option. If you don't want to compile, you can download a pre-compiled binary. I see that I forgot to link to the download page, so I'm adding that now. – Wutaz Feb 3 '14 at 15:41
  • That worked perfectly. I did the following: sudo add-apt-repository ppa:jon-severinsson/ffmpeg and then went into synaptic to upgrade my ffmpeg and it works now. Thank so much!! – user277244 Feb 4 '14 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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