Question

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.

Was it helpful?

Solution

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 !

OTHER TIPS

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.

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.

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

A pure PHP script is available for this.

FLV to MP3 Converter - PHP Script

But, this is commercial.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top