Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 2009 21:22:26 +0100
From:      Roland Smith <rsmith@xs4all.nl>
To:        Gary Kline <kline@thought.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: best archiver? (for music)
Message-ID:  <20090313202226.GA47453@slackbox.xs4all.nl>
In-Reply-To: <20090313191520.GA14233@thought.org>
References:  <20090313191520.GA14233@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 13, 2009 at 12:15:24PM -0700, Gary Kline wrote:
>=20
> 	guys, this is for any compression experts on-list.  my main
> 	desktop is nearly full.  i'm looking for the best means of
> 	compressing [mostly] audio files.  mp3, ogg, and .flag.

All of these are already compressed. Trying to compress them further is
a waste of time. See below. You can make smaller mp3 or ogg vorbis files
by encoding them at a lower bitrate or quality setting.

I did a test on compression some time ago.

I started with a track ripped from CD by cdrecord. I used 'lame -V 2' to
convert to mp3, 'oggenc -q 5' to convert to ogg vorbis, and 'flac -6' to
convert to flac.

File sizes were (in kilobytes, using 'du -k'):
20256	track01.flac
4592	track01.mp3
3792	track01.ogg
37584	track01.wav

The mp3 and ogg files are small because they employ 'lossy'
compression. On the other hand, flac is lossless compression. I tried
several (obviously lossless) archivers.

First I compressed them all with 'gzip -9':
20240	track01.flac.gz
4560	track01.mp3.gz
3760	track01.ogg.gz
33840	track01.wav.gz

As you can see these sound files don't compress well. The first three
because they are already compressed, and the wav file probably because
the gzip algorightm isn't a good match for sound data.

Then I tried with 'bzip2 -9':
20336	track01.flac.bz2
4560	track01.mp3.bz2
3776	track01.ogg.bz2
32080	track01.wav.bz2

Next up is 'rzip -9':

20240	track01.flac.rz
4560	track01.mp3.rz
3776	track01.ogg.rz
32080	track01.wav.rz

And finally 7zip '7z a -mx=3D9':

20448	track01.flac.7z
4576	track01.mp3.7z
3760	track01.ogg.7z
31424	track01.wav.7z

My conclusions were:
- The general archivers can compress the wav somewhat without loss, but
  none do as well as the dedicated lossless compression program flac.
- Trying to compress mp3, ogg and flac files further is a waste of time.
- If you want smaller files, use lossy compression like mp3 or ogg
  vorbis, and pick the lowest quality level that sounds acceptable to you.

Roland
--=20
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

--sdtB3X0nJg68CQEu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)

iEYEARECAAYFAkm6wIIACgkQEnfvsMMhpyXirgCfRIY2Zc++Ke4bRQ40oZaFNvFR
x3AAn1pseHCH0dmRunAxiwa/z0m7uhUc
=L1oR
-----END PGP SIGNATURE-----

--sdtB3X0nJg68CQEu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090313202226.GA47453>