ffmpeg not finding vcodec libx264
Asked Answered
J

5

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'

Judie answered 19/1, 2011 at 16:44 Comment(1)
Another situation: when I run the command with sudo permissions it works fine: <i>ffmpeg -re -i vid.mp4 -vcodec libx264 videoOut.mp4</i> returns "Unknown encoder 'libx264'" but <i>sudo ffmpeg -re -i vid.mp4 -vcodec libx264 videoOut.mp4</i> it works fine So, is the libx264 codec in any folder that can be configured with correct permisions?Borscht
F
6

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

Flita answered 19/1, 2011 at 16:48 Comment(3)
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.Jhansi
..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.Yolandayolande
hi Ismail can u please look this link #9288834Belgrade
U
24

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

Ursulaursulette answered 16/3, 2011 at 3:45 Comment(1)
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-52Teplitz
F
6

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

Flita answered 19/1, 2011 at 16:48 Comment(3)
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.Jhansi
..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.Yolandayolande
hi Ismail can u please look this link #9288834Belgrade
F
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)

Fanchet answered 19/1, 2011 at 16:47 Comment(0)
S
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/
...
Subminiature answered 4/3, 2019 at 15:37 Comment(1)
I still get "Unknown encoder 'libx264 '" when using this static build.Mclaren
R
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).

Recent answered 26/4, 2012 at 21:59 Comment(3)
can't login there.. "you do not have permission to access this page. This could be due to one of several reasons......"Optometry
@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.Beaverbrook
@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.Recent

© 2022 - 2024 — McMap. All rights reserved.