I want to record my screen with audio for practice.

I saw recommendations to use this command line:

ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 800x600 -i :0.0+200,100 -c:a pcm_s16le -c:v libx264 -preset ultrafast -crf 0 -threads 4 output.mkv

But ffmpeg doesn't recognize the "alsa" format or the "pulse" file. If I remove both of those, it can capture the specified region of the screen just fine, but silently.

I'm using Linux Mint 17 Mate edition; I know I'm using ALSA. My testing audio source is VLC (which I thought used PulseAudio) playing an Ogg Vorbis file from the system tray.

This is my ffmpeg configuration:

ffmpeg version 2.2.4 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul  6 2014 09:48:53 with Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
  configuration: --cc=clang --extra-libs=-ldl --disable-shared --disable-ffserver --enable-ffplay --disable-doc --enable-bzlib --enable-zlib --enable-libx264 --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libass --enable-libfaac --enable-libvpx --enable-libopus --enable-x11grab --enable-nonfree --enable-gpl
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100

1 Answer 1


ALSA support isn't inherently built into ffmpeg. You need to have the ALSA development files installed at ./configure time when building ffmpeg.

The ffmpeg configure script looks for alsa/asoundlib.h and libasound. If either is missing, it simply won't build ALSA support into the program.

This contrasts with other features of ffmpeg which you can enable with configure script flags. That is to say, you can't ask it not to build ALSA support in, if it finds the header and library files.

You must log in to answer this question.

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