I'm trying to set up ffmpeg so I can do screen captures and just receive error after error after error. However, the root issue is that I can't even seem to enable x11grab.

In Terminal I've done this:

$ cd ffmpeg
$ ./configure --enable-gpl --enable-x11grab

And I get this error:

ERROR: X11 not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

As far as I can tell I have the latest version of ffmpeg.

Suggestions on next steps to take?


ffmpeg -version gives me this:

ffmpeg version 1.0
built on Oct 31 2012 15:46:24 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --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 --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil      51. 73.101 / 51. 73.101
libavcodec     54. 59.100 / 54. 59.100
libavformat    54. 29.104 / 54. 29.104
libavdevice    54.  2.101 / 54.  2.101
libavfilter     3. 17.100 /  3. 17.100
libswscale      2.  1.101 /  2.  1.101
libswresample   0. 15.100 /  0. 15.100
libpostproc    52.  0.100 / 52.  0.100
  • I've used FFmpeg for other video work, so I know it's there. Post updated with version info. Oct 31 '12 at 20:22
  • Oh, sheesh, well I did install Yasm, and I'm running Mountain Lion. Oct 31 '12 at 20:44
  • Even if you install the required x11 files I'm not sure if it will work as expected--it may only capture programs that use X, but I am not totally sure since I do not use OS X.
    – llogan
    Nov 1 '12 at 20:08

What you're attempting is not really possible, or probably won't give you what you want.

Per this GitHub project README:

Despite its name, most programs in Mac OS X actually does not use X (it uses something called Core Graphics or Quartz instead). Even if you compile ffmpeg with x11grab you will only be able to record applications that runs X, like gimp and wireshark.

So, even if you compile FFmpeg with x11grab, you won't be able to capture the screen. You can install XQuartz, which will give you the ability to enable x11grab and compile—at least I hope so—but your possibilities will be very limited.

In essence, again quoting from Albert Veli:

Another option is to actually ask the kind ffmpeg developers if they might implement a "quartzgrab" format option sometime in the future.

Until then, you might want to resort to QuickTime for recording your desktop, or check out other desktop recording tools like Snapz Pro X.


It's been so long since it was asked that probably nobody will care, but just in case someone stumbles upon this question, it's perfectly possible (as of now, I don't know whether it was back then) to capture the screen using ffmpeg in Mac OS X using the "avfoundation" device.

To get a list of available sources:

ffmpeg -f avfoundation -list_devices true -i ""

Then to actually capture:

ffmpeg -f avfoundation -i "<screen device index>:<audio device index>" <destination filename>

Source: ffmpeg wiki

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.