An alternative strategy could be to use ffmpeg to transcode flv into mp3.

The real challenge is to find a recent compiled executable that support the
Nellymoser/ Speex (assuming that the source is the user mic). 

 

 

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Jeff Ramin
Sent: Wednesday, November 18, 2009 12:37 AM
To: Open Source Flash Mailing List
Subject: [osflash] flv file format question

 


I want to read an FLV file for the purpose of transcoding the audio,
and I'm using classes from the red5 project to iterate through the 
tags in the file.

The section of the http://osflash.org/flv page on audio states:


FLV Tag 0x08: AUDIO


The first byte of an audio packet contains bitflags that describe the codec
used, with the following layout: 


Name 

Expression 

Description 


soundType 

(byte & 0×01) » 0 

0: mono, 1: stereo 


soundSize 

(byte & 0×02) » 1 

0: 8-bit, 1: 16-bit 


soundRate 

(byte & 0x0C) » 2 

0: 5.5 kHz, 1: 11 kHz, 2: 22 kHz, 3: 44 kHz 


soundFormat 

(byte & 0xf0) » 4 

0: Uncompressed, 1: ADPCM, 2: MP3, 5: Nellymoser 8kHz mono, 6: Nellymoser,
11: Speex 

The rest of the audio packet is simply the relevant data for that format, as
per a SWF <http://osflash.org/swf>  SoundStreamBlock.


However, when I dump the first few bytes of audio data from consecutive
tags,
I see this pattern:

tag 1: b2 2a d7 5b
tag 2: b2 2a d7 5a
tag 3: b2 2a d7 5a
tag 4: b2 2a d7 5a

It seems there is more header data than a single byte. Is anybody familiar
with FLV file formats and audio data (speex encoded, in this instance) that
could clear this up for me?

Thanks.




-- 
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