[fpc-pascal] Converting .m4a to .wav

2011-03-09 Thread Leonardo M . Ramé
Hi, does anyone knows if there's a library/class/function to handle .m4a 
(IPhone sound files)? also, if it allows conversion to other formats, such as 
.wav?

Thanks in advance,
Leonardo M. Ramé
http://leonardorame.blogspot.com



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Converting .m4a to .wav

2011-03-09 Thread Jonas Maebe


On 09 Mar 2011, at 13:52, Leonardo M. Ramé wrote:

Hi, does anyone knows if there's a library/class/function to  
handle .m4a (IPhone sound files)?


m4a is a plain mp4 container with an aac-encoded soundtrack (and no  
video). There is nothing iPhone-specific about it. Any library that  
can handle mp4 containers and the aac audio codec will do (such as  
ffmpeg).



Jonas___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Converting .m4a to .wav

2011-03-09 Thread Matt Emson

On 09/03/2011 12:52, Leonardo M. Ramé wrote:

Hi, does anyone knows if there's a library/class/function to handle .m4a 
(IPhone sound files)? also, if it allows conversion to other formats, such as 
.wav?


m4a is basically aac, so I'd look down that route. However, m4a files 
can be protected by DRM, and those files will be much harder, maybe even 
impossible, to convert. Though, I believe the extension becomes m4p when 
protected, and also m4b when an audio book. The format is much richer 
than MP3 or WAV as it can contain meta data such as notes, images and 
chapter markers. You'll lose these when converting.


M
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Converting .m4a to .wav

2011-03-09 Thread Leonardo M . Ramé
--- On Wed, 3/9/11, Matt Emson memson.li...@googlemail.com wrote:

 From: Matt Emson memson.li...@googlemail.com
 Subject: Re: [fpc-pascal] Converting .m4a to .wav
 To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
 Date: Wednesday, March 9, 2011, 1:08 PM
 On 09/03/2011 12:52, Leonardo M.
 Ramé wrote:
  Hi, does anyone knows if there's a
 library/class/function to handle .m4a (IPhone sound files)?
 also, if it allows conversion to other formats, such as
 .wav?
 
 m4a is basically aac, so I'd look down that route. However,
 m4a files can be protected by DRM, and those files will be
 much harder, maybe even impossible, to convert. Though, I
 believe the extension becomes m4p when protected, and also
 m4b when an audio book. The format is much richer than MP3
 or WAV as it can contain meta data such as notes, images and
 chapter markers. You'll lose these when converting.
 
 M

Thanks, I tested a sample file sent by my customer, and it was easy to convert 
with mplayer using this command:

mplayer -ao pcm test.m4a -ao pcm:file=output.wav 

As mplayer uses ffmpeg library I'm sure I can use it from fpc.

Leonardo M. Ramé
http://leonardorame.blogspot.com




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal