I have a created a music visualisation using Processing. I now want to convert that to a video, and the least obtrusive way I could think of is to record a screencast.
I figured exporting Processing to video including audio, from within Processing itself, on ubuntu seemed an unsolved issue. Very hard and also could cause timing sync issues (since the music keeps running while images are captured). So move on to the screencast method.
Dead-easy, I figured. But I was wrong. First hurdle was to find a way to record the sound from the audio (and not the mic).
I did find a tutorial for that here.
In short: use gtk-recordmydesktop
and pulse audio
.
Exactly:
- start PulseAudio
- start gtk-recordmydesktop, and set input from DEFAULT to pulse
- start recording
- see the Recording tab in PulseAudio, and selected Internal Audio (or Monitor)
This works if I record from e.g. my webbrowser playing a youtube movie. I see that appear in the PlayBack tab, and can then easily record it. But not for Processing. Processing is written in java. Processing does not use ALSA but uses the hardware devices directly to create the sounds. When the sound is playing, it does not appear in the Pulse Audio mixer.
How can I record the audio now?