通过 RTMP/Rails 录制音频
我正在构建一个 Rails/Flex 应用程序,该应用程序需要录制音频然后存储在我们的亚马逊 s3 帐户中。我没有找到使用某种形式的 RTMP 服务器通过 Flash 录制音频的替代方案,但是我们的托管环境不允许我们安装 FMS、Red5 等任何东西。
是否有任何现有的 Ruby/Rails RTMP 解决方案可以允许音频录制?如果没有,Rails 是否有可能至少拦截 RTMP 流,然后我可以希望参考 red5 的源代码或其他东西来解析数据(我知道可能性不大)?
我能想到的另一种选择是在另一台主机上托管 red5 服务器,并在保存/上传完成后与我们的 Rails 应用程序进行通信,这不是首选。
我在这里会有好运吗?
I am in the process of building a rails/flex application which requires audio to be recorded and then stored in our amazon s3 account. I have found no alternative to using some form of RTMP server for recording audio through flash, but our hosting environment will not allow us to install anything like FMS, Red5, etc.
Is there any existing Ruby/Rails RTMP solution that will allow audio recording? If not, is it possible for Rails to at least intercept the RTMP stream and then I can hope to reference red5's source or something for parsing the data (long shot, I know)?
The other alternative I can think of is hosting a red5 server on another host and communicating with our rails app once the saving/uploading is done, which is not preferred.
Am I going to have any luck here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够让它工作
1) Flash Player 10.1 可以获取麦克风的 ByteArray
2) 我捕获了这个 ByteArray,使用 Adobe 的 WavWriter 类(来自他们放在一起的麦克风教程)以正确的 wav 格式创建一个新的 ByteArray
3) 发送通过 RubyAMF 转移到 Rails
4) 使用了类似的内容
一旦我得到了这个 wav 数据,将其转换为 mp3 就不会太困难了,woo
I was able to get this to work
1) Flash Player 10.1 can get the microphone's ByteArray
2) I captured this ByteArray, used Adobe's WavWriter class (from a microphone tutorial they put together) to create a new ByteArray in proper wav format
3) Sent this over to rails through RubyAMF
4) Used something along the lines of
Once I've got this wav data it won't be too far of a stretch to convert it to an mp3, woo