You will need
- gtk-recordMyDesktop
- PulseAudio Volume Control
- Jack Control
How to record video with audio using GTK-RecordMyDesktop and Jack Control (Linux)
- Start JACK Control and start the Jack server.
- Open the application that will play the audio/video (like your web-browser) and start playing
- Launch PulseAudio Volume Control and move the application's (mentioned in the previous item) playback stream to the Jack Sink.
- Open PulseAudio Playback and Recording VU meters, move both of their streams to the PulseAudio Jack Sink.
- In the Output devices, set the Jack Sink as default.
- In the Input devices, set the Jack Source as default.
- In gtk-recordmydesktop, set the audio to be captured from Jack, select both system:capture_1 and system:capture_2.
- Set up your gtk-recordmydesktop window and start the recording
- Open the Jack connection box and connect the PulseAudio Jack Sink to the recordMyDesktop input port.
- Now you should end up with a video that contains the same audio that you heard through your speakers.
You need to use the Jack method with recordmydesktop, because it only works with alsa and oss, and gtk-recordmydesktop is only acting as a frontend to write out the command line.