Record ouput from jack

From ProAudioOverlay

(Difference between revisions)
Jump to: navigation, search
(maybe someone finds it useful..)
(non-jack-aware apps)
Line 42: Line 42:
Now we set the alsa device in our app (e.g. realplayer 10) to ''jackplug'', and start playing and capturing.
Now we set the alsa device in our app (e.g. realplayer 10) to ''jackplug'', and start playing and capturing.
-
{{Category:Howto}}
+
[[Category:Howto]]

Revision as of 22:10, 30 January 2007

This is a simple howto that describes how to record the output from any app directly using jack.

Prerequisites

To capture the output from jack, there is a nice and simple commandline tool called jack_capture.

emerge -av jack_capture

It can record to WAV or to FLAC directly. In order to encode to flac, you'll need libsndfile with FLAC support

USE="flac" emerge -av libsndfile

And of course we need jackd running.

jack-aware apps

This is easy. Just connect your app to jack and start playing. If you want the to record just what you listen, type

jack_capture

For more details see

jack_capture --help

non-jack-aware apps

Here we first need to define a pseudo ALSA device. Therefore we need the ALSA jack plugin

USE="jack" emerge -av alsa-plugins

Then we have to create or edit ~/.asoundrc (per-user) or /etc/asound.conf (system-whide) with following lines:

pcm.jackplug {
    type plug
    slave { pcm "jack" }
}

pcm.jack {
        type jack
        playback_ports {
                0 alsa_pcm:playback_1
                1 alsa_pcm:playback_2
        }
        capture_ports {
                0 alsa_pcm:capture_1
                1 alsa_pcm:capture_2
        }
}

Now we can test this with

aplay -Djackplug some.wav

Works? Cool.

Now we set the alsa device in our app (e.g. realplayer 10) to jackplug, and start playing and capturing.

Personal tools