[Asterisk-video] My AMR experience with app_h324m

Klaus Darilion klaus.mailinglists at pernau.at
Wed Sep 5 01:54:07 CDT 2007



Reza Fatahillah schrieb:
> Thanks for the reply.
> I'm composing the rtp packet for amr like this:
> 1. Add CMR which is F0
> 2. Add TOC which for my case is 3C => 0 111 0 00 (Fbit
> FTbits Qbit PBits)
> 3. Add AMR Frame(AMR Header+AMR Core Speech) comes
> from the encoder(3gpp's AMR library). Which for my
> case start from 3C too.
> So the final bytestream will be like this F0 3C
> 3C02...05.
> 
> Then the trouble comes :). To make it work now i have
> to remove manually the first byte(AMR Header) from
> encoder result.

instead of removing the frist bit it is more safe to omit step 2 (which 
is the header from AMR codec)

regards
klaus


> 
> 
> Reza.
> --- Klaus Darilion <klaus.mailinglists at pernau.at>
> wrote:
> 
>> Hi!
>>
>> I think it would be best if Asterisk internally uses
>> the RTP format of 
>> AMR octed-aligned. This way, Asterisk can relay AMR
>> frames from/to RTP 
>> without any need to analyze and manipulate the AMR
>> frame.
>>
>> The RTP format is (RFC 4867, section 4.4):
>>
>> 1 byte CMR (codec mode request)
>> x bytes ToC (table of contents, indicate the AMR
>> mode of each AMR frame)
>> x AMR frames
>>
>> Thus, if you have 1 frame encoded in mode 7 you will
>> have 33 bytes:
>> 1 byte CMR
>> 1 byte TOC
>> 31 bytes AMR frame in mode 7
> 
> 
>        
> ____________________________________________________________________________________
> Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
> http://autos.yahoo.com/carfinder/
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video



More information about the asterisk-video mailing list