3

I am converting video to mp4 format using FFMPEG.

First, it was giving me an error for Unknown encoder 'libfdk_aac'. After installing libfdk_aac now it is giving me Unknown encoder 'libx264'.

Is there a way we can install all encoders of FFMPEG for Ubuntu 16.04?

Bunty
  • 1,549
  • 13
  • 18
  • Configuring ffmpeg is off topic. If you need help compiling it then we could help =) – Eric Jan 11 '18 at 20:58

1 Answers1

3

ffmpeg doesn't work like that. You can't really just install arbitrary encoders and expect it to use them.

Several options

If you want a specific set of encoders you will have to either:

  • compile ffmpeg, or
  • find a different ffmpeg build that supports your wanted encoders, or
  • use an alternative encoder that your ffmpeg already supports. ffmpeg

Compiling

Because libfdk_aac is considered non-free, and therefore incompatible with the GPL, it is unlikely that you will find any existing ffmpeg builds supporting it being distributed, so you will have to compile. There is a guide you can follow that will do just that and it will include support for libfdk_aac and libx264:

FFmpeg Wiki: Compile FFmpeg on Ubuntu

Download a compiled ffmpeg and/or use a different encoder

If you are willing to use the native FFmpeg AAC encoder (-c:a aac) instead of libfdk_aac, then just use ffmpeg from the repository or even better is to download a recent version.

The ffmpeg from the 16.04 repository is quite old, but it should support libx264 by default, so you must be using a version that is not from the repository.

But I want all encoders

FFmpeg has many built-in ("native") encoders and most get compiled by default, but it also support many external encoders. If you want all of them then you will have to individually enable all of the supported external libraries when running configure during compilation. There are many external libraries and each one needs the proper header files, so you will have to find out which library needs which -dev package. For example, to use --enable-libx264 you need the libx264-dev package to be installed first.

This would be a waste of time. Nobody needs all encoders, and some are not relevant or useful. Just enable the ones you need.

llogan
  • 121,796
  • 28
  • 232
  • 243