Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 mailing list or IRC #ffmpeg on
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
share|improve this question
I've used FFmpeg for other video work, so I know it's there. Post updated with version info. – Brandon Durham Oct 31 '12 at 20:22
Oh, sheesh, well I did install Yasm, and I'm running Mountain Lion. – Brandon Durham Oct 31 '12 at 20:44
... oh, and thank you for you help! – Brandon Durham Oct 31 '12 at 21:29
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. – LordNeckbeard Nov 1 '12 at 20:08
up vote 1 down vote accepted

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.

share|improve this answer

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .