13

I've installed the latest ffmpeg but it seems unable to locate the video codecs. Do I need to completeley remove ffmpeg and re run the ./configure differently in order for ffmpeg to find the video codecs?

Here's my current configuration:

FFmpeg version git-f61cbc2, Copyright (c) 2000-2011 the FFmpeg developers built on Jan 18 2011 10:59:49 with gcc 4.0.1 (Apple Inc. build 5465) configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 libavutil 50.36. 0 / 50.36. 0 libavcore 0.16. 1 / 0.16. 1 libavcodec 52.108. 0 / 52.108. 0 libavformat 52.94. 0 / 52.94. 0 libavdevice 52. 2. 3 / 52. 2. 3 libavfilter 1.74. 0 / 1.74. 0 libswscale 0.12. 0 / 0.12. 0

Or, can I just re-run the make command to include the library?

Here's my snippet for transcoding:

ffmpeg -i ~/Desktop/watercarts.mov -vcodec libx264 -b 250k -bt 50k -acodec libfaac -ab 56k -ac 2 -s 480x320 ~/Desktop/watercartsipod.mp4

And the error:

Unknown encoder 'libx264'

Thank you in advance.

Ofeargall
  • 5,340
  • 5
  • 28
  • 33
  • Another situation: when I run the command with sudo permissions it works fine: ffmpeg -re -i vid.mp4 -vcodec libx264 videoOut.mp4 returns "Unknown encoder 'libx264'" but sudo ffmpeg -re -i vid.mp4 -vcodec libx264 videoOut.mp4 it works fine So, is the libx264 codec in any folder that can be configured with correct permisions? – Emiliano Jul 03 '19 at 18:34

5 Answers5

24

In Ubuntu 10.10 (maverick) this codec is provided by package libavcodec-extra-53 from multiverse repository.

Rose Perrone
  • 61,572
  • 58
  • 208
  • 243
ciastek
  • 1,343
  • 12
  • 15
  • 2
    Ubuntu Precise Pangolin 12.04 LTS and Ubuntu Oneiric Ocelot 11.10 Code: sudo apt-get install ffmpeg libavcodec-extra-53 Ubuntu Natty Narwhal 11.04 and Ubuntu Lucid Lynx 10.04 LTS Code: sudo apt-get install ffmpeg libavcodec-extra-52 – frank.m Jun 05 '12 at 18:03
6

You need to configure with ./configure --enable-gpl --enable-libx264 and you need recent x264.

ismail
  • 46,010
  • 9
  • 86
  • 95
  • Once you've done this, you may also need to specify a preset with something like "-vpre normal" because the default doesn't work right with libx264. – teeks99 Jan 20 '11 at 16:23
  • 1
    ..after which libx264 warns you 'broken ffmpeg default settings detected'. on my lucid ubuntu, thats "-vpre libx264-normal". this refers to a settings file /usr/share/ffmpeg/libx264-normal.ffpreset, there are a couple of others there too. – commonpike Oct 25 '11 at 18:34
  • hi Ismail can u please look this link http://stackoverflow.com/questions/9288334/how-to-solve-bad-instruction-vadd-i16-q0-q0-q0-when-attempting-to-check-gcc-fo – Sureshkumar Menon Feb 18 '12 at 00:36
3

try installing using apt-get install and not by compiling the source. It will download all necessary codec libraries (at least on my gubuntu)

Guy
  • 12,250
  • 6
  • 53
  • 70
2

I found an link to a binary static build on this forum and it worked completely out of the box!

Long story short

$ wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
$ tar xvf ffmpeg-release-amd64-static.tar.xz
$ cd ffmpeg-4.1.1-amd64-static

$ ./ffmpeg
ffmpeg version 4.1.1-static https://johnvansickle.com/ffmpeg/
...
Ben Usman
  • 7,969
  • 6
  • 46
  • 66
0

If you are using ubuntu (various version) , you can install ffmpeg with the lib x264 using this suggestion

http://ubuntuforums.org/showthread.php?t=1117283

Personally i use option "C". Two simple command (copy and paste) , automatic install of the right version + library, nothing to compile, and all work fine :)

If you prefer to compile then there is the "A" option on the same page (it work on ubuntu 10.10 i have compiled the last version).

Antimo
  • 460
  • 1
  • 8
  • 19
  • 2
    can't login there.. "you do not have permission to access this page. This could be due to one of several reasons......" – Valentin Kantor Aug 09 '12 at 18:01
  • 2
    @ValentinKantor; Not only that. If you are registered and logged in you do not get to view the page until you have 50 points in the forums ... Wow. What a great system. – Morpfh Oct 06 '12 at 14:58
  • @Morph and Valentin Sorry :( i just check the page and you are right can't access without login and 50 point, it didn't happen before. If anyone could login to this page please repost the cocnten here, it could be useful for future user. – Antimo Jan 04 '13 at 14:06