49

I'm using carrierwave-video to upload video with my ruby on rails app. But I have this problem when try encode the video:

Unknown encoder 'libfaac'

Errors: no output file created.

I have tried with:

sudo apt-get install libfaac-dev

but I get the same error.

Updated:

After compile ffmpeg, I get the same error:

Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2011-10-13 18:54:50
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 00:06:43.28, start: 0.000000, bitrate: 380 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x600 [SAR 1:1 DAR 8:5], 279 kb/s, 9.25 fps, 25 tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2011-10-13 18:54:50
      handler_name    : 
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 97 kb/s
    Metadata:
      creation_time   : 2011-10-13 18:54:50
      handler_name    : 
Please use -q:a or -q:v, -qscale is ambiguous
Unknown encoder 'libfaac'

Errors: no output file created. 
llogan
  • 121,796
  • 28
  • 232
  • 243
hyperrjas
  • 10,666
  • 25
  • 99
  • 198

2 Answers2

107

FFmpeg removed libfaac support in 2016 because the other AAC encoders are better. Use a different encoder.

Native FFmpeg AAC Encoder (-c:a aac)

Use the native, built-in FFmpeg AAC encoder:

ffmpeg -i input.wav -c:a aac output.m4a
  • Included by default in all ffmpeg versions.
  • Has many features, fairly good quality, supports the most channel layouts and sample rates.
  • See more details and specific options with ffmpeg -h encoder=aac.

Fraunhofer FDK AAC Encoder (-c:a libfdk_aac)

ffmpeg -i input.wav -c:a libfdk_aac output.m4a
  • Provides excellent quality.
  • Supports HE-AAC.
  • Not compatible with the GPL, and therefore not often made available by distributors, so you'll need to compile ffmpeg to use it.
  • See more details and specific options with ffmpeg -h encoder=libfdk_aac.

Apple AudioToolbox AAC (-c:a aac_at)

  • Only available for macOS/iOS users.
  • See more details and specific options with ffmpeg -h encoder=aac_at.

Microsoft Media Foundation AAC (-c:a aac_mf)

  • Only available for Windows users with ffmpeg compiled with --enable-mediafoundation.
  • See more details and specific options with ffmpeg -h encoder=aac_mf.

Also see:

llogan
  • 121,796
  • 28
  • 232
  • 243
  • I have compiled ffmpeg and I have the same result: The ouput is the same result. Thanks! I have updated the question after compile ffmpeg – hyperrjas Nov 05 '13 at 11:28
  • 1
    @hyperrjas The guide does not explicitly enable libfaac. You have to add that by installing **libfaac-dev** package and then adding `--enable-libfaac --enable-nonfree` to the ffmpeg configure. Sorry, I was not clear about that. Why can you not use libfdk_aac instead of libfaac? – llogan Nov 05 '13 at 19:26
  • Are there any other inbuilt AAC encoders in ubuntu that you can use without compiling ffmpeg? – bawse Sep 30 '15 at 22:10
  • @cp101020304 You can use the native FFmpeg AAC encoder (option 2). There have been some recent development and improvements to it lately. You can [download a recent static build of `ffmpeg`](http://johnvansickle.com/ffmpeg/) to take advantage of that. Or you can pipe to a standalone encoder such as `faac` (option 3). – llogan Oct 01 '15 at 01:05
1

hopefully this helps :

Download medibuntu repository list: Code:

sudo wget http://www.medibuntu.org/sources.list.d/lsb_release -cs.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update

Grab the extras with restricted codecs: Code:

sudo apt-get install ffmpeg libavcodec-extra-52

amit karsale
  • 740
  • 5
  • 14