How to compress whole session to FLAC or OGG?

I would like to publish my session and its really big. Is there some way to convert the audio files to FLAC or OGG?

I have tried to convert to OGG and change the ardour XML file to point to the files but it did not worked. Ardour was unable to read the files. Flac encoder was not able to encode float-precision WAVs (gives error).

Do you have some kind of script? Do I have to convert the recorded WAVs to 41.1 KHz int-signed before encoding to OGG?

Thanks

Once you have converted the files you can’t work with them in Ardour. You have to convert them back first.

Use Wavpack instead of Flac to handle 32bit FP-files.

If you really need Flac you have change Ardour to work in 24bit (Options/Audio File Format/Sample Format) and the re-import your source files. Then, before compressing you might need to add a padding byte at the end of each file or else Flac might complain about “ERROR during read of data pad byte”.
To do that you first create an empty byte dd if=/dev/zero of=oneempty bs=1 count=1 and then for each file do a cat file.wav oneempty > fixedfile.wav

Ogg can’t handle 32bit either and it’s a lossy format anyway (which in this case might not matter).

Would be a nice feature for ardour to be able to compress a project file with audio:)