How to convert a FLV file recorded with Red5 / FMS to MP3?

三世轮回 提交于 2019-12-30 07:43:32

问题


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.


回答1:


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 !




回答2:


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.




回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/67647/how-to-convert-a-flv-file-recorded-with-red5-fms-to-mp3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!