I'm trying to use ffmpeg to record a screen capture in Ubuntu 10.04 and
am meeting with audio difficulties. Your help would be appreciated.
I've found many references on the Internet, and this is what I'm using to
grab the window of interest, which is playing a narrated slideshow within
"wine":
$ /usr/bin/ffmpeg -f alsa -ac 2 -i pulse -r 30 -f x11grab \
-s 1020x710+60+27 -i $DISPLAY -sameq -target ntsc-dvd \
-y ~/Desktop/test.mpg
This captures the video component nicely, but the speaker audio is absent
and is necessary for the presentation. There is a quiet hiss on the
playback, but not the recorded voice that was being output through the
speakers during recording.
Some things I've looked at include:
$ /usr/bin/ffmpeg -version
FFmpeg version 0.6.2-4:0.6.2-1ubuntu1~ppa1~lucid1, Copyright (c)
2000-2010 the Libav developers
built on Apr 7 2011 02:04:15 with gcc 4.4.3
... ( a more recent version in $HOME/bin/ doesn't have the x11grab format)
$ grep pulse /etc/group
audio:x:29:root,pulse,grussell
pulse:x:115:root,grussell
pulse-access:x:116:root,grussell
$ egrep -v "^;|^#|^$" /etc/default/pulseaudio
PULSEAUDIO_SYSTEM_START=1
DISALLOW_MODULE_LOADING=0
$ aplay -L
pulse
Playback/recording through the PulseAudio sound server
front:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
$ pulseaudio --dump-conf
### Read from configuration file: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-0.9.21/modules
default-script-file = /etc/pulse/
default.pa
load-default-script-file = yes
log-target = auto
log-level = notice
resample-method = speex-float-1
enable-remixing = yes
enable-lfe-remixing = no
default-sample-format = s16le
default-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 8
default-fragment-size-msec = 10
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 1000000