Re: Conversion to 3gp
Re: Conversion to 3gp
- Subject: Re: Conversion to 3gp
- From: Norman Franke <email@hidden>
- Date: Fri, 20 Jul 2007 15:25:31 -0700
I tried to use the "afconvert" program in
/Developer/Examples/CoreAudio/Services/AudioFileTools to convert to
mp4 and ran into problems.
Converting without a bitrate is fine, it works. However, I need to
specify the bitrate. Giving it the -b 20000 (or 64000, whatever) fails
on the call to
mDestFile.SetConverterProperty(kAudioConverterEncodeBitRate) with
operation not supported. Clearly there has to be a way to set the
bitrate, since the GUI does this. If I have it ignore the error, then
it crashes in SMACMP4scomDispatch with a EXC_BAD_ACCESS.
My command line is:
./afconvert -f 'mp4f' -d 'aac ' -b 20000 -s 1 -v 116.aiff 116.mp4
I tried specifying a sample rate:
./afconvert -f 'mp4f' -d 'aac @8000' -b 20000 -s 1 -v 116.aiff 116.mp4
Same deal. Am I missing a parameter or what?
-Norman
Quoting William Stewart <email@hidden>:
On 19/07/2007, at 2:50 PM, Norman Franke wrote:
Seems I was mistaken. I don't think the iPhone supports .3gp AMR,
just .3gp AAC. This is rather surprising given the painfully slow
EGDE network's capabilities in that it supports no low bitrate
speech formats. So, I guess I'll be converting to AAC, and I assume
I can export .mp4 using a similar method.
One can do this without a temp file using AudioFileInitializeWithCallbacks?
Sure - audio file supports reading/writing mp4 with AAC on tiger
Bill
-Norman
Quoting William Stewart <email@hidden>:
I can help you on Leopard but not on previous systems, through the
use of the CoreAudio APIs.
On Leopard we will have the ability to write 3gp files with AMR
data. You can use the ExtendedAudioFile API quite simply:
(1) Create an ExtAudioFile object of type 3gp and data format is AMR
(2) Set the client format to a PCM format that is most convenient to you
(3) Push data in using the ExtAudioFileWrite call, where you
provide it the data in the format you set, and it will handle the
conversion and write to the underlying file object for you.
You could use the ConvertFile example
(/Developer/Examples/CoreAudio) in the SimpleSDK folder as a
starting point. You could for instance, write CAF files with AMR
data in it. Then, when you have Leopard you will be able to write
the 3GPP file. On Leopard as well, you can also read and write AMR
files if that's of interest.
Thanks
Bill
On 19/07/2007, at 1:14 PM, Norman Franke wrote:
I'm attempting to convert a custom ADPCM format to 3GP / AMR for
streaming to an iPhone. I need to do this without a GUI,
basically, pass it a buffer of samples and get a .3gp file as
output. I'd prefer to do this without an intermediate file.
I've looked at the same code on apple.com (under QuickTime), most
of which is quite out of date. None seem to do this without a GUI
and/or file IO.
I had some old code that uses SoundConverter to convert to
PureVoice, but I had to hard code the compression params (magic
cookie).
How do I specify both the media type AMR and file type (3gp), get
the magic cookie/compression params and the like?
Is the the wrong way to go?
-Norman
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
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
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
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