tags:

views:

1460

answers:

5

Hi,

I'm looking for a way to extract the audio part of a FLV file.

I'm recording from the user's microphone and the audio is encoded using the Nellymoser Asao Codec. This is the default codec and there's no way to change this.

DISCLAIMER : I'm not attempting to do anything illegal (like stealing copyrighted content...). This is a business requirement of the application I'm building.

+2  A: 

This isn't an exact answer, but some relevant notes I've made from investigating FLV files for a business requirement.

Most FLV audio is encoded in the MP3 format, meaning you can extract it directly from the FLV container. If the FLV was created from someone recording from their microphone, the audio is encoded with the Nellymoser Asao codec, which is proprietary (IIRC).

I'd check out libavcodec, which handles FLV/MP3/Nellymoser natively, and should let you get to the audio.

owenmarshall
A: 

I was going to recommend this: http://code.google.com/hosting/takenDown?project=nelly2pcm&notice=7281.

But its been taken down. Glad I got a copy first :-)

+1  A: 

I'm currently using FFmpeg version SVN-r12665 for this, with no problems (the console version, without any wrapper library). There are some caveats to using console applications from non-console .NET environments, but it's all fairly straightforward. Using the libavcodec DLL directly is much more cumbersome.

bzlm
+2  A: 

ffMpeg is the way to go ! It worked for me with SVN Rev 14277.

The command I used is : ffmpeg -i source.flv -nv -f mp3 destination.mp3

GOTCHA :

If you get this error message : Unsupported audio codec (n), check the FLV Spec in the Audio Tags section.

ffMpeg can decode n=6 (Nellymoser).
But for n=4 (Nellymoser 8-kHz mono) and n=5 (Nellymoser 16-kHz mono) it doesn't work.

To fix this use the default microphone rate when recording your streams, overwise ffMpeg is unable to decode them.

Hope this helps !

Costo
A: 

Hello, I am using Red5 as well, and I have the same exact problem you had. Is there anyway to make this using JavaScript, instead of FFmpeg? The thing is that I don't want the server to do this because it will make it slower.

Any help will be appreciated!

No, I don't think you can use Javascript to do this kind of things.
Costo