Via ALSA emulation
I don't have a Debian 6.0.x box to test on, but I think this way will probably work. Courtesy an example on the Arch wiki.
First, use pacmd list-sources
to find the name of your sound card's monitor stream. Grep for .monitor
works pretty well:
$ pacmd list-sources | grep '\.monitor'
name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
name: <alsa_output.usb-stereo-link_stereo-link_1200_USB_DAC-00-DAC.analog-stereo.monitor>
I have two cards, hence two monitors. Then edit your ~/.asoundrc
to set up an ALSA device for it, by adding lines like (but of course use your monitor device name, not mine):
pcm.pulse_monitor {
type pulse
device alsa_output.usb-stereo-link_stereo-link_1200_USB_DAC-00-DAC.analog-stereo.monitor
}
ctl.pulse_monitor {
type pulse
device alsa_output.usb-stereo-link_stereo-link_1200_USB_DAC-00-DAC.analog-stereo.monitor
}
Then use arecord -f s16_le -t wav -r 44100 -D pulse_monitor /tmp/outfile.wav
to record.
Older PulseAudio Utilities
Instead of using ALSA emulation, you can use parecord
on the monitor you found above. Do so like this: parecord -d alsa_output.usb-stereo-link_stereo-link_1200_USB_DAC-00-DAC.analog-stereo.monitor outfile.wav
. That should work with parec
as well (in the LAME example below)
Newer PulseAudio Utilities
PulseAudio ships with a parecord
command-line utility that can record sound going through it.
To use it, first find the index of the stream you want to capture. Easy way from the command line is pacmd list-sink-inputs
, which should give something like this:
1 sink input(s) available.
index: 10720
driver: <protocol-native.c>
⋮
client: 87 <Chromium>
⋮
I've omitted a bunch of lines; but you can see that's Chromium (where I have a music player running). The index: 10720
bit is important.
To record it, it's as simple as parecord --monitor-stream 10720 outfile.wav
. You can also write the output to stdout and use it as part of a pipe with parec
; for example if you're short on disk space you could directly encode to MP3:
parec --monitor-stream 10720 --format s16le --channels 2 --rate 44100 \
| lame -r -s 44.1 -b 16 --signed --little-endian --preset medium /dev/stdin outfile.mp3
Spoof to 4.3.0.37 version by exiting Skype and running the relevant command:
4.2.0.13 --> 4.3.0.37 Spoof (Tested Working)
sudo sed -i "s/\x34\x2E\x32\x2E\x30\x2E\x31\x33/\x34\x2E\x33\x2E\x30\x2E\x33\x37/g" /usr/bin/skype
2.2.0.25 -> 4.3.0.37 Spoof (Not Tested)
sudo sed -i "s/\x32\x2E\x32\x2E\x30\x2E\x32\x35/\x34\x2E\x33\x2E\x30\x2E\x33\x37/g" /usr/bin/skype
For other versions (Not Tested)
The version number to spoof from must be in this format X.X.X.XX because we will replace it with 4.3.0.37
Run the command below, replacing 4.2.0.13 with your Skype version number. This will output the replace command which you should then copy and run in a terminal like the method above:
ver=$(echo "4.2.0.13" | xxd -p | sed 's/.\{2\}/&\\x/g;s/^/\\x/;s/\\x0a\\x//'); echo "sudo sed -i \"s/$ver/\x34\x2E\x33\x2E\x30\x2E\x33\x37/g\" /usr/bin/skype"
At the moment the Skype executable is sending the username, password and skype version to the Skype servers. If the Skype executable version is not at 4.3.0.37 then you will get the error Skype can't connect
. All this fix does is replace that ASCII version number string e.g. "4.2.0.13" within the Skype executable to 4.3.0.37. Skype then allows you to login. I have only tested this on version 4.2.0.13, but I believe it should work on other versions too.
Best Answer
This command will capture your full desktop: So use this command, whenever you want to record skype-conversation ( or anything else )