Importing Audio
Audio File Formats Supported by Audacity
The "native" audio formats (importable by Audacity as shipped) are:
- Uncompressed audio formats: WAV, AIFF.
- Compressed audio formats: Ogg Vorbis, FLAC, MP2 and MP3.
Gale: MP2 imports failing unrecognised is fixed now.
- Steve wrote: Not sure how to work this in, but when importing, Audacity treats FLAC files like uncompressed audio. If "import faster" is selected, FLAC files are not copied and are dependencies.
- Gale: Looks like a bug here. On Windows, FLAC files come in with libflac, copied in. On Linux they come in with libsndfile, so trigger the Importing Uncompressed Audio Files warning. Bill, can you initialise and say what happens on Mac?
- Bill: On Mac with initialized cfg libflac is used, copied in.
But FLAC is a compressed format, so the "when importing uncompresed files" header is misleading if FLAC files can be read-directly?- Gale: no answer made when I enquired on -devel.
The optional FFmpeg library may be installed to enable import from a much larger range of audio formats (as long as the files are not protected to work only in particular software). FFmpeg will also import audio from most video files that are not DRM protected.
Audacity also supports importing Audacity's AU data files. This format should not be confused with Sun Microsystems AU files, which are usually u-law encoded PCM files but may be headerless.
Old PCM file types such as SND and AU files are normally supported provided they contain correctly formatted header information. If they do not have header information (headerless) or have non-standard header information, it may still be possible to import them as Raw Data.
Raw Data formats such as headerless AU files and Dialogic ADPCM (VOX) have no header information and must be imported using .
Four Ways to Import Audio
No matter which method you use to select an audio file, the file is always imported into an Audacity project. Each imported audio file appears in the Audacity project in its own track.
1. File > Open
- This command will behave differently in the following situations:
- With no Audacity project window open, or an Audacity project window open containing (or that has ever contained) at least one track:
If you select the command, then choose one or more audio files (as opposed to an Audacity project file), Audacity will, for each file chosen, open a new project window then import one of the selected audio files into that new project. Thus if you choose, for example, three audio files, Audacity will create three new project windows with each audio file imported into its own project. - With a clean, empty Audacity project window open (one with no tracks in it and that has never contained any tracks):
If you select the command, then choose one or more audio files, Audacity will import the first file into the empty project window, and import subsequent files into new project windows.
- With no Audacity project window open, or an Audacity project window open containing (or that has ever contained) at least one track:
Gale:As someone who understands the distinction in the first place, the above note div just confuses me. Better to attack this further up the article IMO, explaining that any of the four actions that bring audio into the project window are regarded as "importing". The point of importing in the sense of the menu item of that name is that it always brings audio into the same project.
Bill: The issue I was trying to address is users who "open" a WAV file and then wonder why they can't "save" it. I've tried it both ways for comparison. What do others think?
Peter 26Apr11: seems perfectly clear (and necessary) to me. But note that the need for this will go away if James' recent proposal incorporating the restriction of "Open" to operate only on projects and not audio files is implemented. See Menu Reorganization in the Wiki.
2. File > Recent Files (Open Recent on Mac)
- This command behaves identically to .
3. File > Import > Audio
- If you select the command, then choose one or more audio files, Audacity will import the selected file(s) into the existing project. This is the way to get several audio files into one project.
4. Drag and drop
- On Windows and on Macintosh:
- Drag and drop one or more audio files onto the Audacity icon: this is equivalent to .
- Drag and drop one or more audio files into an open Audacity project window: this is equivalent to .
- On Linux:
- Drag and drop one or more audio files onto the Audacity icon: only the first file will open. More than one file dragged and dropped onto the icon will do the same as the command for the first file, but the other files will generate an error message saying that Audacity is already running.
- Drag and drop files into an open Audacity Project window: this is equivalent to .
Importing Uncompressed Audio Files
The two most common uncompressed file types you will encounter are WAV and AIF.
Peter 16Apr11: I would place the "safer" option as point 1 especially since it is now the default post 1.3.13. It's not strictly true that for the "faster" setting that "long files can be imported in ony a few seconds" as you say. It can take quite a time to get the full waveform graphic drawn - and technically you are not actually "importing" the audio, just linking to it. What you can do is start editing on the file quicker (before the full waveform is drawn) when using "faster".
Bill 16Apr11: Yes, I'm aware of those points, which were raised in a recent thread on one of the lists. The text is copied from the File menu page. Note that while the waveform is being calculated the message "Import Complete - calculating waveform" appears in the status area. I don't want to contradict what the UI says!
Steve 16Apr11: Personally I prefer "faster" as point 1. The great value of the faster option for me is that I can immediately start work. If a user has got as far as reading this page of the manual, they should be able to take full advantage of this feature safely. It's a good feature and deserves promoting. I think it also makes more sense to talk about "copying in" audio files after talking about linking to external files.
- Gale: Yes, unfortunately, the status bar when OD importing says imports are "complete" at the point the waveform drawing starts. I said that was a contradictory use of "import" at the time... But I would say (again), let's stick to the item ordering in the Audacity buttons (mention copy in first) and use the wording on the warning (edit almost immediately).
- Peter: Not on Mrs. Waxcylinder's W7 laptop with 1.3.14 it doesn't. While drawing the waveform the status bar only shows the remaining recording time. I could not get it to show the "percentage completion" or "complete" messages - see the image I recently uploaded for the manual: http://manual.audacityteam.org/man/File:ODinprogress.png
Uncompressed files can be imported into Audacity in two ways.
- Make a copy before editing (safer)
When this option is chosen Audacity makes a copy of all imported file(s). It is essential that files are copied into the project if the Audacity project is to be moved, opened on another computer, or sent to someone else. This is the default setting. - Read directly from the original (faster)
When this option is chosen Audacity always reads imported files from the computer folder you first imported them from, without copying them into the project. Therefore with this option set, you must not move, rename or delete imported uncompressed files, or the folder they are in. The advantage of this option is that you can begin editing a long file almost immediately, since On-Demand Loading will be used to import the file.
Dependencies
If you import any uncompressed audio files into your project using the "read directly" option, then your project depends on those files. At any time you can check which files your project depends on by clicking on . See the Dependencies Dialog page for details.
When you save a project you can choose whether or not to copy dependent files into the project. See the Projects Preferences page for details.
Warning Dialog when Importing Uncompressed Audio Files
The first time you import an uncompressed audio file into Audacity, you will see this dialog.
For each file selected, you can choose:
- Which method to use to import the file.
- Whether to make your choice permanent and never show this warning again.
Importing Compressed Audio Files
Some of the compressed audio file types you may encounter are MP2, MP3, Ogg Vorbis and FLAC, among others.
When you import a compressed audio file into your project there is no choice between "safer" and "faster"; the audio file is always copied into the project.
The choice made in the Format drop-down menu in these dialogs does two things.
- It restricts the file list to files of that type (or those supported by that importer), according to the file extension.
- It chooses which importer to use.
The choices in the Format drop-down menu are:
- All files
- All files in the list are selectable, even those not supported by Audacity or FFmpeg
- The built-in Audacity importers will be tried first, then FFmpeg (if installed)
- All supported files
- Only those files supported by Audacity or FFmpeg (if installed) are selectable
- The built-in Audacity importers will be tried first, then FFmpeg
- Audacity Projects - This option is available only when you use the command
- Only Audacity project files (.aup) are selectable
- No importer is involved, since you are opening an Audacity project, not importing an audio file
- WAV, AIF and other uncompressed types
- Only uncompressed files are selectable
- The built-in Audacity importers will be tried first, then FFmpeg (if installed)
- If the built-in Audacity importers are used and "read directly" is chosen in Import / Export Preferences then On-Demand Loading will be used. If the FFmpeg importer is used, On-Demand Loading will not be used.
- Ogg vorbis files, FLAC files, MP3 files
- Only files of the specified type are selectable
- The built-in Audacity importers will be tried first, then FFmpeg (if installed)
- List of files in basic text format
- Only files ending in .lof are selectable. See LOF Files for how to create and use LOF files.
- The importer used will depend on the files pointed to by the LOF file.
- FFmpeg compatible files - this option is only available if you have installed the optional FFmpeg extension.
- Any file types supported by FFmpeg are selectable
- The FFmpeg importer will always be tried first if "Attempt to use filter in OpenFile dialog first" in Extended Import Preferences is checked, otherwise the native importer will be tried first.
- Note that if this option is chosen and an uncompressed file type is selected from the list, On-Demand Loading will not be used.
- Quicktime files - Mac only
- Any file type supported by Quicktime is selectable
- Quicktime will be used to decode the file and send it to Audacity
Interaction with the Extended Import Preferences
Bill: Proposed text follows ... (updated by Gale) The Extended Import Preferences pane has a checkbox that reads "Attempt to use filter in OpenFile dialog first". 'Filter' in this context means the choice made in the 'Format' drop-down menu when using File > Import > Audio or File > Open.
If
- there are any rules listed in the Extended Import Preferences for the file type being imported, and
- "Attempt to use filter in OpenFile dialog first" is not checked
then
- the importer used will always be determined by the Extended Import rule
(otherwise the importer used will be as detailed in the list in the section above).
If
- "Attempt to use filter in OpenFile dialog first" is checked, and
- Any choice other than "All files" or "All supported files" is made in the Format drop-down menu
then
- the importer used will be as detailed in the list in the section above.
Gale 26Jan11:
This is still quite complex and I hope keeping a bug open against this will lead to it being rethought.
Your first If is correct up to the part I put in parentheses. If the parenthesis is added, it gets a bit hazy for me as does your second If, because testing shows that the method of import can still govern the importer used. So the note div:
The current setting of the file-types dropdown (or the import rule set in Extended Import Preferences if "Attempt to use filter" is unchecked) always determines the importer that tries first to import the file. This is true irrespective of which File menu item you use to import the file(s), or whether you instead drag the file(s) into Audacity.
is wrong and I removed it for now. Only "the import rule set in Extended Import Preferences if "Attempt to use filter" is unchecked" always determines the importer irrespective of import method.
I summarise it thus in the Release Notes for the bug:
By default, the importer used depends on the import method. For example, to be able to use FFmpeg to import native Audacity formats like WAV and MP3, you must choose the "FFmpeg-compatible files" filter in File > Open or File > Import > Audio and always use one of those import methods.
To force FFmpeg to import native Audacity formats when using File > Recent Files or dragging in, add rules for those formats in Extended Import Preferences. To force FFmpeg import irrespective of the filter when using File > Open or File > Import > Audio, uncheck "Attempt to use filter in OpenFile dialog first" in Extended Import Preferences as well as adding the rule for the format.
As I see it the only really important filter in OpenFile (actually using OpenFile, and with no rules, checkbox checked) is "FFmpeg-compatible files". Otherwise whatever filter you choose gives you the "expected" importer for the format you actually select in the list window (native if it's a native format, FFmpeg if not native). Does it help to say something like that in the section above?
If you uncheck the box and use File > Open or File > Import > Audio, you basically undo the "expected" OpenFile rule, if there is an alternative. You force the native importer to be used even if you choose "FFmpeg-compatible files" for a native file. On Linux, you also force libsndfile to be used for FLAC (libsndfile is also used irrespective of the checkbox state if you drag in or use Recent Files). I'm not sure if it's worth even documenting "use OpenFile but uncheck the box".
If you add rules, these always override FileOpen filters and always apply irrespective of the import method if the box is unchecked. If the box is checked, the FileOpen filter is tried first if you actually use File > Open or File > Import > Audio.
So how I'm feeling is to describe this by what end result you want instead of the if's/then's with rules on/off and checkbox on/off.
