- Tutorial — Recording Computer Playback on Linux
- PulseAudio
- Other Methods
- Alternative programs for recording computer playback
- Use a loopback cable
- Building On Linux
- Contents
- Instructions in linux/build.txt
- Instructions
- CMake Build
- Official Full Releases
- Updating .po files
- Making a Minimal Tarball
- Older / Obsolete stuff
- Updating GitIdent
- Making a Minimal Tarball
- gcc 4.9 on Ubuntu 14.04
- audacity(1) — Linux man page
- Synopsis
- Description
- Options
- Files
- Search Path
- Plug-ins
- Version
- License
- Ubuntu Documentation
- Installing Audacity
- Audacity and PulseAudio
- Use the pulse device
- Intrepid (8.10)
- Suspend PulseAudio
- Troubleshooting xruns
- Locating libmp3lame.so When Exporting MP3 Files
Tutorial — Recording Computer Playback on Linux
Copyright or website restrictions may prevent you recording or distributing material. Check first. |
PulseAudio
PulseAudio is a sound server providing professional audio features such as mixing and input/output routing. It is the default audio device on many Linux distributions including Ubuntu, Linux Mint and many Debian/Ubuntu-based distributions. PulseAudio operates as a proxy between sound applications and the audio hardware (usually via ALSA). PulseAudio Volume Control provides a «Monitor» device which listens for the audio output of other applications such as Firefox or Rhythmbox. Setting PulseAudio Volume Control to capture from the Monitor device lets Audacity record computer playback when its input device is set to pulse.
- If not already installed, add PulseAudio Volume Control (pavucontrol) to your system. This is usually available in the distribution’s repository.
- Ensure that PulseAudio is running. In Audacity’s Device Toolbar, set the Host to ALSA and the recording device to pulse.
- On systems where PulseAudio is the default sound system the recording device may be set to default.
- Audacity’s playback device may be set to pulse or to any available audio interface.
- Ensure that «Software Playthrough» is not enabled in the Transport Menu then left-click on the Recording Meter to turn monitoring on.
- Open PulseAudio Volume Control and choose the «Recording» tab.
- In the «Capture from» dropdown, select the «Monitor» option of the playback device used by the application you want to record from, as shown below:
- Launch the application that you wish to record and begin playback.
- In the «Recording» tab of PulseAudio Volume Control, drag the volume sliders so that the recording level in Audacity’s Recording Meter is to left of 0 dB (-6 dB is a good level to aim for).
- The playback level of the application being recorded will also affect the level of the recording. Use the «Playback» tab in PulseAudio Volume Control or the volume control in the application to adjust the output level.
- If you want to record without hearing the audio, you can turn down the Audacity playback slider or turn down the sliders on the Output Devices tab of PulseAudio Volume Control. Do not use the Mute button in PulseAudio Volume Control, because this will cause Audacity to record silence. You can also set the port on the Output Devices tab of PulseAudio volume control to the audio output such as «headphones» but not connect any headphones or speakers to the port.
- When the recording level has been correctly adjusted, press the Record button in Audacity .
For a detailed description using Ubuntu 10, see Stereo Mix with Ubuntu 10 on the Audacity wiki.
Jack Audio System is commonly used in Linux distributions that specialise in media creation such as Ubuntu Studio and Studio 64.
To use Audacity with Jack it is useful or in some cases essential to have a few additional packages installed. This documentation assumes that you have Jack Audio System working on your machine. For help with setting up Jack, please consult the documentation for your Linux distribution.
Recording sounds playing from other applications is rather easy with Jack. Jack may be started using QjackCtl or from the command-line. If Audacity is launched after Jack is started then «Jack Audio Connection Kit» will be an available host option in the Device Toolbar. If Jack is started after Audacity has been launched then it will be necessary to Transport > Rescan Audio Devices for new audio devices before jack is available to Audacity.
Any Jack-compatible applications that are running before Audacity is launched will have their ports available in Device Toolbar. To make an application available to Audacity that is launched after Audacity it is necessary to use Rescan Audio Devices in the Transport Menu. After rescanning audio devices, input and output ports from other applications will be available in the Recording and Playback boxes in Device Toolbar.
In this image the output of Hydrogen drum machine is being selected as the recording source. This will enable Audacity to record directly from the audio output from Hydrogen. If «System» is selected as the recording source then Audacity will record from the physical audio interface input.
Applications that do not directly support Jack may also be used with Jack on a system that uses PulseAudio (such as Ubuntu and Debian based distributions) by installing «pulseaudio-module-jack». This provides the modules «Jack Source» and «Jack Sink» that allow PulseAudio to use Jack. For example, to record sounds playing through Firefox, PulseAudio Volume Control (pavucontrol) can be used to direct the output from Firefox to Jack Sink. The recording input for Audacity can then be set to record from «PulseAudio Jack Sink» and the sound will be recorded.
Other Methods
Alternative programs for recording computer playback
An alternative to recording streaming audio from the Internet is to download the data directly to disk, either by using command-line tools such as streamripper or mplayer, or with a browser plug-in (many available for Firefox), or writing the stream to disk from a media player such as VLC or xmms, or using a graphical down-loader such as streamtuner.
Use a loopback cable
This is a simple and effective method of recording what is playing on the computer. It has the disadvantage that the audio signal is converted from digital to analog, then from analog to digital, instead of staying in the digital domain. This may result in some slight increase in noise and distortion.
Plug your line-out or headphones-out to the line-in using a cable with a stereo mini-plug at each end, then record from line-in. To hear the sound while recording, use a single to double stereo connector to give you a jack for the speakers or headphones.
If you have only mic-in and no line-in is selectable through alsamixer, you can build an attenuator to reduce the line level output to a level suitable for mic-in. But probably this will only provide mono recording, because mic-in is mono in most cases. As well, the quality may be questionable.
Источник
Building On Linux
This page has been deprecated. Newer information can be found here: https://github.com/audacity/audacity/blob/master/BUILDING.md | |
The information on this page are likely out-of-date and will not be updated in the forseeable future. It may be removed at any time. |
These are instructions for building on Linux |
The build family of pages:
- Building On Windows
- Building On Mac
- Building On Linux
Contents
Instructions in linux/build.txt
These instructions are supplemental to the linux/build.txt in the source code.
Step-by-step instructions for building on Ubuntu are also periodically posted to the Audacity forum.
In addition to the listed dependencies and standard build environment, Audacity also requires Python 3 (Audacity 2.4.1 and earlier requires Python 2.7).
On Debian / Ubuntu, systems, if Python 3 is not already installed, it may be installed with:
Instructions
CMake Build
Instructions for building cmake for distributions that only have CMake Variations
Official Full Releases
Official full releases:
- Executables: Have a GitIdent, visible in the about box build information, that says what branch was used in building.
- Source-Code distros: Are minimal cut down versions from the release branch. We take out system libs that we expect to be provided by the distro, and that we haven’t patched.
Updating .po files
With an official release, we ask translators to translate an updated .pot file. We create this with the following script:
Note: The script has the Audacity version number in it in three places, and all three should be updated before running it.
Making a Minimal Tarball
If using CMake build (you should use it!)
Older / Obsolete stuff
This instructions are not up to date and will not work with Audacity 2.4.2 or later. |
Updating GitIdent
- We recommend that maintainers of linux distros that ship pre built copies of Audacity build with a GitIdent that reflects the state of their version of the branch including their patches to it.
- We don’t recommend having a Git ident when distributing in source code form, and we don’t either in our
The CMake build adds the gitident automatically and this step is only needed with the automake builds.
Making a Minimal Tarball
If using Autotools buildchain
gcc 4.9 on Ubuntu 14.04
If you’re on Ubuntu 14.04, you need to upgrade the gcc compiler to at least 4.9.
Источник
audacity(1) — Linux man page
Synopsis
audacity [-blocksize nnn] -test
audacity [-blocksize nnn] [ AUDIO-FILE ] .
Description
Audacity currently uses libsndfile to open many uncompressed audio formats such as WAV, AIFF, and AU, and it can also be linked to libmad, libvorbis, and libflac, to provide support for opening MP2/3, Ogg Vorbis, and FLAC files, respectively. LAME, libvorbis, libflac and libtwolame provide facilities to export files to all these formats as well.
Audacity is primarily an interactive, graphical editor, not a batch-processing tool. Whilst there is a basic batch processing tool it is experimental and incomplete. If you need to batch-process audio or do simple edits from the command line, using sox or ecasound driven by a bash script will be much more powerful than audacity.
Options
size for writing files to disk to nnn bytes
Files
Default location of Audacity’s temp directory, where is your username. If this location is not suitable (not enough space in /tmp, for example), you should change the temp directory in the Preferences and restart Audacity. Audacity is a disk-based editor, so the temp directory is very important: it should always be on a fast disk with lots of free space.
Note that older versions of Audacity put the temp directory inside of the user’s home directory. This is undesirable on many systems, and using some directory in /tmp is recommended. Open the Preferences to check.
Search Path
Any directories in the AUDACITY_PATH environment variable will be searched before anywhere else.
The current working directory when Audacity is started.
The system-wide Audacity directory, where
is usually /usr or /usr/local, depending on where the program was installed.
The system-wide Audacity documentation directory, where
is usually /usr or /usr/local, depending on where the program was installed.
For localization files in particular (i.e. translations of Audacity into other languages), Audacity also searches
Plug-ins
Audacity supports two types of plug-ins on Unix: LADSPA and Nyquist plug-ins. These are generally placed in a directory called plug-ins somewhere on the search path (see above).
LADSPA plug-ins can either be in the plug-ins directory, or alternatively in a ladspa directory on the search path if you choose to create one. Audacity will also search the directories in the LADSPA_PATH environment variable for additional LADSPA plug-ins.
Nyquist plug-ins can either be in the plug-ins directory, or alternatively in a nyquist directory on the search path if you choose to create one.
Version
License
Audacity is distributed under the GPL, however some of the libraries it links to are distributed under other free licenses, including the LGPL and BSD licenses.
For details of known problems, see the release notes and the audacity wiki:
Источник
Ubuntu Documentation
Needs Updating
This article needs updating to include the latest versions of Ubuntu. More info.
Audacity is a free, open source application for recording and editing audio. For more information, see the Audacity project home page.
Installing Audacity
Audacity is not installed by default in Ubuntu. To start using Audacity, install the package audacity from the Universe software channel. For more information on installing packages, see InstallingSoftware.
Once installed, click Applications -> Sound & Video -> Audacity to start Audacity.
Audacity and PulseAudio
Ubuntu 8.04 and above install PulseAudio as the default sound server. You have to make sure they don’t both grab the sound device at the same time.
Use the pulse device
For Ubuntu 9.04 and above, there is an «ALSA: pulse» device listed in Audacity’s preferences dialog. Make sure it is selected. (If there is no «ALSA: pulse», try «ALSA: default».) Now audacity records and plays back via PulseAudio, and with this you can also use PulseAudio’s features (such as e g recording monitoring streams).
Intrepid (8.10)
In order to get the «ALSA: pulse» device as mentioned above, David Henningsson has built fixed packages; they can be installed by adding his PPA as described in https://edge.launchpad.net/
Suspend PulseAudio
If the above solution does not work for you, start audacity with this terminal command: «pasuspender — audacity»
This will temporarily pause PulseAudio while running audacity (causing other applications to stop sound input/output).
Troubleshooting xruns
XRuns are drop-outs and/or clicks in recording or playback that are caused by your computer doing other things than handling soundcard input/output buffers. In the Audacity layer you can try to increase the latency (edit -> preferences -> recording).
Locating libmp3lame.so When Exporting MP3 Files
By default, the library libmp3lame.so is not installed in Ubuntu. Use the table below to find the name of the package you have to install depending on your Ubuntu version. (For more information on installing packages, see InstallingSoftware.)
Dapper (6.06), Hardy (8.04): package liblame0 from the Multiverse software channel.
Intrepid (8.10), Jaunty (9.04), Karmic (9.10): package libmp3lame0 from the Multiverse software channel.
Lucid (10.04): package liblame0 from the Multiverse software channel. Please note that Lucid regains the liblame0 package name. This is just a virtual package provided by the real libmp3lame0 package.
You can verify Audacity finds the library going to: Edit -> Preferences. -> Libraries -> MP3 Export Library.
When Audacity asks you to locate libmp3lame.so, you will be able to locate it in /usr/lib and export MP3 files.
Audacity (последним исправлял пользователь ckimes 2017-09-22 19:24:16)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
Источник