开发者

Problem with recording audio in Flash (Red5, ffmpeg)

I'm trying to implement a small program with Flash and php that records audio and converts it to mp3.

Currently I have Red5 server up and running, I can connect to it with no problems and I can publish flv recordings to the server. When I listen to the flv with Wimpy FLV player it seems to be fine. The problem comes when I'm trying to convert it with ffmpeg on the command line. I'm simply using a command ffmpeg -i but the output wav is about 50% slower than the input. When I record 10sec, the output is 15sec and pitched down.

I've also tried all kinds of bitrate setting开发者_如何学JAVAs, -nv option, etc. but nothing seems to work. I have a recent version of ffmpeg that supports nellymoser format.. Don't know what to do. Anyone have any ideas?


Instead of nelly moser codec you should use the speex codec when attaching the mic. The codec is open source and ffmpeg should handle it better.


I did almost same things as you(Record to Red5, then convert flv to mp3 by ffmpeg), and succeeded.

In my case, I've publish with Microphone.rate = 44 as below

mic = Microphone.getMicrophone();
mic.rate = 44;
...//publish...

In server side, following gives me fine mp3.

ffmpeg -y -i "sample.flv" -ac 2 -ab 128kb "sample.mp3"

.

Or, If you could upload your *.flv somewhere, someone could help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜