Saving as compressed project (wide size variation)

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
rtront
Posts: 6
Joined: Tue Jul 20, 2010 5:05 am
Operating System: Please select

Saving as compressed project (wide size variation)

Post by rtront » Tue Jul 20, 2010 5:19 am

I'm new to Audacity but seem to be getting along.
I am confused about a couple of things though.
I'm using Audacity 1.3.12-beta, on Win7-64

1) When I File > Save as compressed project, sometimes for a 40 minute music recording I get a 30-60MB project with no e00 subdirectory (this is somewhat comparable to a 128kbps MP3 of the project). Other times I get a 250-400MB project with an e00 subdirectory using most of the space. This is somewhat comparable in size to the uncompressed project. Of my 6 similar compressed projects (all about 40 minutes of music long), I got two of the small kind and 4 of the kind, even though I saved all six as compressed projects. Does anyone know why there is such a wide size disparity?

2) Somtimes when I open an existing stereo project, the lower track is placed below the normal location by about 2 centimeters. If I mess around (not sure what I did) but twice I got the misplaced track to move back into it's correct location. Does anyone know why this is happening?

Thanks very much, rtront.

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Saving as compressed project (wide size variation)

Post by kozikowski » Tue Jul 20, 2010 6:31 am

Most modern compressors depend on show content. The easier it is to compress the show, the smaller the show files. For one simple example, Instead of using Left and Right stereo, use the sum and difference -- a lossless conversion through simple math. A mono show will compress to half the size of a stereo show, and is completely recoverable later. There are other tricks like that. A single flute will compress much better than an orchestra, etc.

http://en.wikipedia.org/wiki/Ogg

Koz

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving as compressed project (wide size variation)

Post by steve » Tue Jul 20, 2010 5:31 pm

rtront wrote:Other times I get a 250-400MB project with an e00 subdirectory using most of the space. This is somewhat comparable in size to the uncompressed project.
That sounds like it is an ordinary project and not a compressed project. Assuming that you did not accidentally select "Save Project As..." instead of "Save Compressed Copy of Project" I've no idea why it should happen (first time I've heard of that happening).

Are you able to pin it down to any particular project, or does it seem to be totally random?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

rtront
Posts: 6
Joined: Tue Jul 20, 2010 5:05 am
Operating System: Please select

Re: Saving as compressed project (wide size variation)

Post by rtront » Tue Jul 20, 2010 8:37 pm

Thanks Koz and Steve for replying.

Koz, I agree that different kinds of music would compress differently. But the variation shouldn't be a factor of eight for the same genre of music.

Steve, it doesn't seem to be random. If I try to save compressed again on a project that didn't compress very well, I still get the same (likely the exact same) size. I've definitely tried several times just to be sure I wasn't selecting the wrong file menu operation. I perhaps haven't tried re-saving a project that saved really small.

So I'm still looking for further suggestions from anyone.
Thanks, rtront.

rtront
Posts: 6
Joined: Tue Jul 20, 2010 5:05 am
Operating System: Please select

Re: Saving as compressed project (wide size variation)

Post by rtront » Tue Jul 20, 2010 8:40 pm

It is certainly true that if there is no e00 subdirectory then there is a large ogg file in the _data subdirectory. It seems to be there whether there is a large e00 directory or not.
I wonder if the e00 directory is being written unnecessarily some of the time (not sure when). Perhaps I should just delete the large e00 subdirectory and see if the compressed project will still open?
Cheers, rtront.

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving as compressed project (wide size variation)

Post by steve » Tue Jul 20, 2010 9:32 pm

Are you saving the compressed file with a unique name?
(just wondering if you have somehow managed to save the compressed project into an existing normal project).

Another thing to try - see what happens when you select "File menu > Check Dependencies"
Do you get the same results with projects that compress successfully and projects that don't?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

rtront
Posts: 6
Joined: Tue Jul 20, 2010 5:05 am
Operating System: Please select

Re: Saving as compressed project (wide size variation)

Post by rtront » Wed Jul 21, 2010 2:51 am

Problem solved but Audacity has ungraceful behavior.

When you open a compressed project by double clicking it in Windows Explorer, Audacity changes the 1KB .aup file into several dozen KB, and builds a huge e00 subdirectory in the _data subdirectory. When you close the project it doesn't remove the e00 subdirectory.
WARNING: You might think that you could then remove the e00 subdirectory and lose the excess space. But if you do that you get a severe error on openning because the now-uncompressed project can't find its data. (You might be able to recover by openning the .ogg file).

So compressed projects are for one time use only, even if you don't change them. If you re-open it you must save to yet another compressed project name, and delete the old compressed project .aup and _data directory.

Too bad that you can't just delete the e00/ subdirectory of a compressed, re-openned, and closed project. Perhap Audacity should when missing its entire e00 directory fallback to looking for a .ogg file in the _data directory rather than bringing up a warning that the project is unusable.

Question #1: Does anyone know if a compressed project retains all the markers and other info you might have in the project? The .aup file is just 1KB in size.
Question #2: Does anyone know what degree of .ogg compression Audacity uses to save to a compressed project? Is it settable anywhere?

Thanks, rtront

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving as compressed project (wide size variation)

Post by steve » Wed Jul 21, 2010 4:33 pm

rtront wrote:Problem solved but Audacity has ungraceful behavior.
I don't usually use compressed projects, but now that I've tried it I can see what you mean.

I can also see why it is happening, and although there is a workaround, it is difficult to see how the developers can make it work any other way.

The root of the issue is the way that Audacity handles files and projects.

Audacity projects are designed as a production format that supports multiple audio tracks, label tracks, multiple sample rates and many other features. In order to do that, Audacity uses lots of small data files that contain the uncompressed audio data in a very high quality format.
When you "Import" an audio file into Audacity, one of two things happens (depending on what format the audio is and what settings you have in Preferences. Either, Audacity links to the file and copies data from it as and when necessary into the current project data folder, or it copies all of the data into the current project data folder at the time that you Import it. If no data folder exists, for example if it is a new, unsaved project, then Audacity uses a temporary data folder instead.

This all works fine as long as you don't want to move the project anywhere.
However, there was a lot of demand for making Audacity projects more portable, so "Compressed Projects" were invented.

Compressed projects are not designed to be a regular way of working in Audacity, they were designed specifically to enable projects to be more easily transported from one machine to another (for example if you are working on a collaborative project then the Compressed Project can be sent over the Internet, or posted on a disk).

Audacity does not edit audio files.
This is a common misapprehension that gets lots of users into trouble until they read the instructions ;)
There is a comprehensive description here: http://wiki.audacityteam.org/wiki/File_Management_Tips

When you save a project as a Compressed copy, all of the audio data that is required by the project is copied into the new data folder as compressed Ogg files.
So, what happens when you open a Compressed Project? Audacity does not work directly on audio files (such as the Ogg files), so it imports the Ogg files. This is what creates the sub folders with all of the little .AU data files in them. They are created in the Compressed Project data folder, because that is the current project data folder.
At this point, the Compressed Project has been converted into a standard Audacity Project so that Audacity is able to work with it, and that is why the size mushrooms to the size of a standard Audacity Project.

If after working with the project you want to save it again as a Compressed Project, then you should select from the File menu "Save Compressed Copy of the Project". If you no longer need the current working project, you can delete it.

It is not generally a good idea to keep opening and saving Compressed Copies because there is always some sound quality loss each time the audio data is compressed to Ogg format, and that quality loss is not recoverable. For this reason it is best to work with uncompressed data until the project is complete.
rtront wrote:Question #2: Does anyone know what degree of .ogg compression Audacity uses to save to a compressed project? Is it settable anywhere?
The Ogg "Quality" settings (that's what Xiph call the "compression" settings") are retained from the last time you exported an Ogg file.
If you want to change the settings, just make a short dummy track and export it as an Ogg file. On the screen where you select "Ogg" as the format, click the "Options" button to set the "Quality". After exporting the dummy file, the setting will be retained for the next time that Ogg export is used.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

rtront
Posts: 6
Joined: Tue Jul 20, 2010 5:05 am
Operating System: Please select

Re: Saving as compressed project (wide size variation)

Post by rtront » Thu Jul 22, 2010 6:24 am

Thanks Steve for the useful information, especially about the degree of ogg compression used. It's an odd design; i would have allowed in a save to compressed project dialog for the user to specify the degree of ogg compression.

You say that when creating a new project and recording/importing audio, audacity stores the information in a temp directory. Later when you save the project, of course you give the project a name and audacity likely just renames (i.e. renames and relocated) the temp directory.
If I were a software engineer (and I am), I would do the same when openning a compressed project; use a temp directory.
I suppose you would want to imply to a user after editing the project that he can't just Save the project; he must either use Save As to give the project a new name, or Save as Compressed Project whence he could either overwrite the input ogg file/project or save compressed to another name/location. What do you think? Perhaps just gray out the File > Save menu item. Altenately, you could leave the File > Save menu item and have it check with the user that they really want to save this back to a 'compressed' project.

Thanks again. Russ.

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Saving as compressed project (wide size variation)

Post by steve » Thu Jul 22, 2010 3:56 pm

I think you make some good points there - perhaps you would like to make some "official" suggestions?
There is a section of this forum where you can suggest new/improved features for Audacity http://forum.audacityteam.org/viewforum.php?f=20

I think that your suggestions for access to Ogg settings in "Save Compressed Project" dialogue is definitely worth suggesting. (there has been a similar request regarding Exporting from "Chain" commands).

I think that opening Compressed Projects into the Temp folder may be more problematic. A Compressed Project is basically an ordinary Audacity Project in which each track has been exported as an Ogg file and placed as a dependency within the _data folder. Creating a Compressed Project that behaved differently from other Audacity projects would probably require restructuring/redefining how these type of projects work. You can of course still put forward your suggestion, but it would probably be better to put it in a separate forum thread to the other suggestion.
rtront wrote:If I were a software engineer (and I am)
Perhaps you'd be interested on working on these areas yourself? If you're interested in doing any development work in Audacity, the starting place is to build Audacity from the current SVN source: http://audacityteam.org/community/developers
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked