I am so confused.

I am trying a quite simple FFMpeg command to transcode a movie file to a x264/AAC mp4 file via the command line (for Vimeo upload). (Mountain Lion/Macports)

ffmpeg -i INPUT.AVI -vcodec libx264 -acodec libfaac -preset hq -s hd720 -b 5000k -ar 44100 -ab 320k OUTPUT.mp4

Problem: FFMpeg cannot find the libfaac library. I have read it has recently been taken out. True? I also have read that I better use NeroAACEnc or libvo_aacenc anyways as they might be better quality-wise.

How do I:

  1. Add NeroAACEnc and/or libvo_aacenc to my system?
  2. What is the correct command line to invoke one of these when they are installed? I have seen solutions with pipes etc.

Command line, Linux and Unix work is all a bit new to me, so I cannot work out what internet is telling me to do. Macports confuses me a bit too.

Looking forward to your pro help here.

Here is the complete iTerm2 output:

ffmpeg -i test.mp4 -vcodec libx264 -acodec libfaac -preset hq -s hd720 -b 5000k -ar 44100 -ab 320k OUTPUT.mp4
ffmpeg version 0.11.1.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  4 2012 11:25:44 with clang 4.0 ((tags/Apple/clang-421.0.57))
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --arch=x86_64 --enable-yasm
  libavutil      51. 65.100 / 51. 65.100
  libavcodec     54. 41.100 / 54. 41.100
  libavformat    54. 17.100 / 54. 17.100
  libavdevice    54.  1.100 / 54.  1.100
  libavfilter     3.  2.100 /  3.  2.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2012-04-27 12:10:05
    encoder         : HandBrake 0.9.6 2012022800
  Duration: 00:00:32.83, start: 0.000000, bitrate: 3241 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3074 kb/s, 29.97 fps, 30 tbr, 90k tbn, 180k tbc
      creation_time   : 2012-04-27 12:10:05
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, s16, 164 kb/s
      creation_time   : 2012-04-27 12:10:05
Please use -b:a or -b:v, -b is ambiguous
Unknown encoder 'libfaac'
| improve this question | | | | |

With slhck's help, I found the missing libfaac solution. I had to reinstall the ffmpeg macport with the following variant chosen to allow libfaac to install (which has been taken out of the standard package due to licensing issues)

sudo port install ffmpeg +nonfree

...will install libfaac as well.

| improve this answer | | | | |
  • Feel free to drop a comment for remaining questions, or even post a new one! – slhck Aug 31 '12 at 17:59
  • libfaac can only support a maximum quality of 152kbit/s which is on the low side. Hence I am trying to encode using the NeroAACEnc or libvo_aacenclibraries instead. How can I compile these in Mac OS to use in my encoding? – Henrik Söderlund Aug 31 '12 at 18:29
  • Looks like my in-depth edit to this answer did not get approved. An alternate solution would have been to use a different encoder that your version of ffmpeg supports (such as libmp3lame) and output to mkv. Vimeo would have probably been fine with that. – llogan Aug 31 '12 at 19:34
  • Good idea. I have found afconvert to be a viable alternative for AAC encoding. How would a simple complete ffmpeg command look like using this encoder for audio and same x264 settings as abobe? I am fiddling with pipe outputs and stuff, I cannot get it right. – Henrik Söderlund Sep 1 '12 at 1:33
  • @LordNeckbeard I can't find that edit from your profile, but I do it myself or approve it again for you if you let me know. We always appreciate your contributions — I'm sorry if another user rejected that edit. Or you could post your own answer here. – slhck Sep 1 '12 at 5:27

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.