• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Issue converting audio files to Apple Lossless
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue converting audio files to Apple Lossless


  • Subject: Re: Issue converting audio files to Apple Lossless
  • From: scott brown <email@hidden>
  • Date: Mon, 15 Mar 2010 08:44:42 -0400

I actually misspoke about the ConvertFile being correct.  If ConvertFile writes kAudioFileCAFType , then the file is identical when converted back to WAV.  But if ConvertFile writes kAudioFileM4AType, the file is not identical when converted back to WAV.  Apple's own "afconvert" utility has the same problem.  Is this a bug, or is there really something special that needs to be done when converting to Apple Lossless to make it truly "lossless?"  I can't write a truly lossless file

Example file.  original wav (output given by Jason Jordan's excellent "shntool" utility):

Length:                       6:40.27

Channels:                     2

Bits/sample:                  16

Samples/sec:                  44100

Block align:                  4

Header size:                  44 bytes

Data size:                    70623504 bytes

Chunk size:                   70623540 bytes

Total size (chunk size + 8):  70623548 bytes

Actual file size:             70623548

CD-quality properties:  Cut on sector boundary:     yes

  Sector misalignment:        0 bytes

WAVE properties:

  Non-canonical header:       no

  Extra RIFF chunks:          no

Possible problems:

  File contains ID3v2 tag:    no

  Data chunk block-aligned:   yes

  Junk appended to file:      no

I then converted it to Apple Lossless using Apple's "afconvert".  I then converted that file back to WAV.  Here is the resulting wav:

Length:                       6:40.24

Channels:                     2

Bits/sample:                  16

Samples/sec:                  44100

Block align:                  4

Header size:                  44 bytes

Data size:                    70615584 bytes

Chunk size:                   70616759 bytes

Total size (chunk size + 8):  70616767 bytes

Actual file size:             70616768

CD-quality properties:  Cut on sector boundary:     no

  Sector misalignment:        1488 bytes

WAVE properties:

  Non-canonical header:       no

  Extra RIFF chunks:          yes (1139 bytes)

Possible problems:

  File contains ID3v2 tag:    no

  Data chunk block-aligned:   yes

  Junk appended to file:      yes (1 byte)


On Thu, Mar 11, 2010 at 5:32 PM, scott brown <email@hidden> wrote:
(responding to my own post)


If I change the outputformat of my code to just convert to

aiff (and keep the reading/writing loop exactly as is), the

original wav and resulting aiff have identical audio data.

This is what I would expect.


So is there some magic foo that I need to do for Apple

Lossless that I'm missing?  Is it not as simple as just

setting the output format the way that I have done?


Thanks,


Scott


link to my previous post (too large to include in the body of this message)


http://lists.apple.com/archives/Coreaudio-api/2010/Mar/msg00062.html




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Issue converting audio files to Apple Lossless
      • From: Robert Martin <email@hidden>
References: 
 >Re: Issue converting audio files to Apple Lossless (From: scott brown <email@hidden>)

  • Prev by Date: RE: vDSP FFT on PPC
  • Next by Date: Re: Issue converting audio files to Apple Lossless
  • Previous by thread: Re: Issue converting audio files to Apple Lossless
  • Next by thread: Re: Issue converting audio files to Apple Lossless
  • Index(es):
    • Date
    • Thread