Site icon Audio Recording

Record Streaming YouTube Music in Ardour & Jack: ALSA to Jack Audio

This is a important tutorial on how to record internet radio or any streaming music such as Youtube in ALSA using Ardour and Jack in Linux. This tutorial is tested to work on the following configuration (these are the essential packages which your system should have):

OS: Linux/Ubuntu 10.04 Lucid Lynx
ALSA-base(Advance Linux sound architecture): 1.0.22.1 + dfsg-0ubuntu3
Jack library files- 0.118+svn3796-1ubuntu2
Ardour – 1:2.8.6-ubuntu0.1

You will know the version of those components in the Synaptic Package Manager. In any streaming medium, for example those that originated from a web browser is using an ALSA streamer version (this is the default streamer used by Ubuntu). However, without some connectivity or plug-in you will not be able to record streaming music from ALSA to your JACK recording environment, which is the one used by Ardour. The following are the complete steps on how to make this work:

Step1.) Go to Applications – Sound & Video – click Ardour GTK2. This will launch the Ardour program. Make sure to turn off any Ubuntu audio or PulseAudio applications that are running because this can interfer with the operation. Examples of Pulseaudio application includes the Rhythmbox music player. It is also recommended to close all open applications and only makes Ardour as the running applications in your Ubuntu computer. This will prevent a lot of problems and speed up the operation.

Step2.) In the “Session Control”, type StreamingTest as the project name. Then since this is a test, save it to your Ubuntu Desktop. Click New to create this project.

Step3.) Once the project has been created, you will only see one track at default. This is the master bus. Do not remove this bus. Instead go to Track – Add Track/Bus – under: “Add this many” select 1, then check “Busses”. Under “Stereo Configuration”, select “Stereo”. And in the track mode, select “Normal”. Finally click “Add”. This is the screenshot of this configuration:

Adding new bus in Ardour

Step4.) Once it is added, you need to change the Bus name from “Bus1” to something more meaningful and easy to identify such as “StreamingBus”.

Step5.) You need to add a track to record the streaming output from the “StreamingBus”. In this case, go again to Track – Add Track/Bus – Then in the “Add this many”, select only 1. Check “Tracks” option. And in the channel configuration, select “Stereo”. This is how it looks like:

adding new tracks in Ardour

Step6.) Rename the track name from “Audio1” to “RecordStream”. As of this stage, this is how your Ardour work environment will look like:

Record streaming



By using the principle discussed in this routing tutorial in Ardour: , you need to feed the output of “StreamingBus” to “RecordStream” track. This implies that the input to “RecordStream” is the output of “StreamingBus”.

Step7.) Go to Window – Show Mixer – Then configure the input of “RecordStream”. By default, it takes its input from the System Capture 1 and 2 channels. You need to remove that and replace it with:

ardour: StreamingBus/out1 to In1
ardour: StreamingBus/out2 to In2

Configuring recording inputs in Ardour


After doing this, save your session (Session – Save) and then exit Ardour.

Step8.) Now you have configured “RecordStream” track to record the outputs of StreamingBus channels. You next job is to configure “StreamingBus” to accept inputs from ALSA streaming source using JACK. To do this, simply download this ALSA to JACK configuration file: ; then extract the file (Right click – Extract here). The file that you need is named as .asoundrc. Take note that after extraction, you will not see this file because its hidden. You need to enable the viewing of hidden files by View– Show Hidden Files.

Step9.) Go to Places – Home Folder then cut and paste .asoundrc
Step10.) Launch Firefox and then go to youtube.com. Select your favorite audio that you need to record. Let the streaming to complete first (from start to end of the music), so that the recording in Ardour will not be interrupted in case of slow internet connection. When it streams completely, exit Firefox. The cache will still there so when its reloaded it will stream much faster. Do NOT clear your browsing history.
Step11.) Re-launch Ardour and open StreamingTest session project.
Step12.) Re-open Firefox and go back to the Youtube URL you need to record.
Step13.) Go to Window – Show Mixer. You need to configure the input of “StreamingBus” channel to accept ALSA streaming music from the browser. Under “Available connections”, you should see the ALSA inputs available, for example out_000 and out_001. Add out_000 to in1 and add out_001 to in2. This is how it looks like after this configuration:

Adding ALSA inputs to JACK

Click close. This is how your mixer will also look like.

Mixer in Ardour

Exit the mixer.
Step14.) Try playing the music from Youtube, you should see the volume level meters getting the substantial signal. This is how it looks like:

Streaming Test volume


Stop the streaming after this test.
Step15.) Hit the record button of “RecordStream” track. See screenshot below.
Step16.) Hit the main record button(found near the top portion of Ardour), it will start blinking, indicating its ready. See screenshot below, inside the yellow box. The upper record button is the main record button.

record button in ardour

Step17.) Finally to start the recording, hit the main play button on Ardour. When Ardour starts recording, hit the play button on the Youtube video to start streaming . The stream music will be captured in Ardour. See screenshot:

captured recording in Ardour

This completes the process. Feel free to link to this document as a reference.

Content last updated on June 27, 2012

Exit mobile version