You can set the frames per packets via:

mic.framesPerPacket=X;

I set that value to one in my code, as it makes decoding
simpler.


Andre Kirchner wrote:
Does anyone know how an Speex frame is encapsulated into a RTMP audio packet, 
or where I can find more information about it?

I know Speex frames are 20 ms and 70 bits long when encoding quality is set to 
8, but the RTMP audio samples I captured contain 40 ms, and the payload 140 
bytes long.

I can't say that each RTMP packet contains 2 Speex frames because the first 
byte of each RTMP audio packet payload is an identifier of the codec used (In 
my case 0xB2 = RTMP_AUDIO_SOUND_FORMAT_SPEEX + RTMP_AUDIO_SOUND_RATE_55_KHZ + 
RTMP_AUDIO_SOUND_SIZE_16_BITS + RTMP_AUDIO_SOUND_TYPE_MONO, although 
RTMP_AUDIO_SOUND_RATE_55_KHZ is ignored because flash uses 16kHz when speex is 
used), and not part of the encoded frame, and this leaves me with 139 bytes.

Thanks in advance,

Andre



_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org


--
Jeff Ramin
Software Engineer
Singlewire Software
PO Box 46218
Madison, WI 53744-6218

Phone Direct - 608.298.1024
www.singlewire.com


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to