Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    Finland
    Posts
    119

    Is FLAC really lossless?

    Up to now, I've simply assumed that it is. And I guess those of you who've tested it thoroughly can verify that it really is.

    But I've just did a quick test using FLAC frontend. I added a WAV files and using default settings I clicked Encode. Then, I renamed the original WAV, added the newly created FLAC and clicked Decode.

    The file size of the newly created WAV file wasn't the same as the original WAV. It was about 2KB smaller.

    For further testing, I encoded the new WAV and decoded the FLAC is created. It seems that all succeeding FLAC and WAV files were identical. It's just the original WAV I couldn't duplicate.

    Any idea what's going on?

    Edit:
    I just tried with another WAV file and this time the resulting WAV file after encode and decode is only 2 bytes smaller. Still not identical though.
    Last edited by Aylwin; 2005-08-26 at 21:45.

  2. #2
    Josh Coalson
    Guest

    Is FLAC really lossless?

    --- Aylwin <Aylwin.1ueowz (AT) no-mx (DOT) forums.slimdevices.com> wrote:
    >
    > Up to now, I've simply assumed that it is. And I guess those of you
    > who've tested it thoroughly can verify that it really is.
    >
    > But I've just did a quick test using FLAC frontend. I added a WAV
    > files and using default settings I clicked Encode. Then, I renamed
    > the
    > original WAV, added the newly created FLAC and clicked Decode.
    >
    > The file size of the newly created WAV file wasn't the same as the
    > original WAV. It was about 2KB smaller.
    >
    > For further testing, I encoded the new WAV and decoded the FLAC is
    > created. It seems that all succeeding FLAC and WAV files were
    > identical. It's just the original WAV I couldn't duplicate.
    >
    > Any idea what's going on?


    see http://flac.sourceforge.net/faq.html...wave_flac_wave

    Josh



  3. #3
    Senior Member pfarrell's Avatar
    Join Date
    Apr 2005
    Location
    Wayne, PA
    Posts
    4,251

    Is FLAC really lossless?

    On Fri, 2005-08-26 at 21:40 -0700, Aylwin wrote:
    > Up to now, I've simply assumed that it is. And I guess those of you
    > who've tested it thoroughly can verify that it really is.


    Depends on what you are looking for.

    > The file size of the newly created WAV file wasn't the same as the
    > original WAV. It was about 2KB smaller.


    The FLAC specs, which are really the OggVorbis specs,
    allow padding in the file. This padding is thrown away when
    played. Most of the padding is used to allow space for the tags
    and meta data (title, genre, artist, etc.), which are likely
    to be changed during the life of the file. If there is room,
    the changed metadata can be simply written in place. If there
    is no room, then the whole file has to be rewritten. Since
    lots of songs are several megabytes long, that is a big
    waste. 2KB of padding seems like a decent engineering
    trade off to me. There is probably some way to
    make the space be smaller, but what's 2K out of 3 MB? well
    under 0.1 of one percent.


    --
    Pat
    http://www.pfarrell.com/music/slimse...msoftware.html



  4. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    Finland
    Posts
    119
    Thanks! I won't worry it about it anymore.

  5. #5
    Senior Member pfarrell's Avatar
    Join Date
    Apr 2005
    Location
    Wayne, PA
    Posts
    4,251

    Is FLAC really lossless?

    On Sat, 2005-08-27 at 00:51 -0400, Pat Farrell wrote:
    > On Fri, 2005-08-26 at 21:40 -0700, Aylwin wrote:
    > > Up to now, I've simply assumed that it is. And I guess those of you
    > > who've tested it thoroughly can verify that it really is.


    See also
    http://flac.sourceforge.net/faq.html...ong_meta_edits


    --
    Pat
    http://www.pfarrell.com/music/slimse...msoftware.html



  6. #6
    Junior Member auricle's Avatar
    Join Date
    Apr 2005
    Location
    austin.tx.us
    Posts
    3

    Test with RAW PCM

    When I first started encoding CDs, I discovered that if I extracted the audio to RAW PCM (I use cdda2wav w/ cdparanoia library) and encode/decode using

    flac --force-raw-format

    the RAW input and output files would compare bit-for-bit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •