Flex:使用流媒体进行computeSpectrum?

发布于 2024-08-18 10:49:37 字数 748 浏览 8 评论 0原文

我编写了一个 Flex3 应用程序,并通过 Red5 服务器通过 RTMP 传输音频。我希望能够使用 SoundMixer.computeSpectrum(),但频谱数据全为零。 Adobe 在一处写道 SoundMixer.computeSpectrum() 不适用于 RTMP 数据:

“对于从 RTMP 源加载的媒体,您无法使用 BitmapData.draw() 和 SoundMixer.computeSpectrum() 方法来提取运行时图形和声音数据。” http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000353.html

足够清楚了。除此之外,有computeSpectrum()的实际文档:

“此外,此方法不能用于从RTMP流中提取数据,即使它是由与RTMP服务器驻留在同一域中的内容调用的。[...] Flash Player 9.0.115.0 及更高版本以及 Adob​​e AIR 中通过 RTMP 支持此方法。”

嗯。这对我来说似乎很矛盾。

有什么建议吗?

I have a Flex3 app I wrote and I'm streaming audio over RTMP from a Red5 server. I'd love to be able to use SoundMixer.computeSpectrum(), but the spectrum data is all zeros. In one location, Adobe writes that SoundMixer.computeSpectrum() does not work with RTMP data:

"For media loaded from RTMP sources, you cannot use the BitmapData.draw() and SoundMixer.computeSpectrum() methods to extract run-time graphics and sound data."
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000353.html

Clear enough. Except, there's the actual documentation for computeSpectrum():

"In addition, this method cannot be used to extract data from RTMP streams, even when it is called by content that reside in the same domain as the RTMP server. [...] This method is supported over RTMP in Flash Player 9.0.115.0 and later and in Adobe AIR."

Ummm. That seems contradictory to me.

Any advice one way or the other?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

演多会厌 2024-08-25 10:49:37

这是关于该主题的整体博客文章:http://fefranca.com/blog/?p= 6
这里是针对 Red5 的建议修复: http://osflash.org /pipermail/red5_osflash.org/2009-November/038844.html

<bean id="rtmpSampleAccess" class="org.red5.server.stream.RtmpSampleAccess">
    <property name="audioAllowed" value="true"/>
    <property name="videoAllowed" value="true"/>
</bean>

Here is an overall blog post on the subject: http://fefranca.com/blog/?p=6
And here is a proposed fix for Red5: http://osflash.org/pipermail/red5_osflash.org/2009-November/038844.html

<bean id="rtmpSampleAccess" class="org.red5.server.stream.RtmpSampleAccess">
    <property name="audioAllowed" value="true"/>
    <property name="videoAllowed" value="true"/>
</bean>
抱猫软卧 2024-08-25 10:49:37

服务器端(Flash Media Server 脚本)上还有“client.allowAudioSampleAccess”属性,据我所知,它允许客户端完全执行您想要的操作 - 通过“computeSpectrum”方法读取音频样本数据。

There is also the 'client.allowAudioSampleAccess' property on server-side (Flash Media Server scripts), which allows clients to, as far as I understood, do exactly what you want - read audio sample data by the 'computeSpectrum' method.

风铃鹿 2024-08-25 10:49:37

computeSpectrum 和 ID3 标签不适用于来自 Flex 应用程序所在域以外的其他域的数据。

computeSpectrum and ID3 tags doesnt work with data from other domain than where flex application is located.

甜味超标? 2024-08-25 10:49:37

引用 Adob​​e 自己的公开文档“Programming Adob​​e ActionScript 3.0 for Flash”,第 700 页(第 32 章,标题“加载内容”,副标题“使用 RTMP 服务器交付的内容”:

对于从 RTMP 源加载的媒体,您不能使用 BitmapData.draw() 和
SoundMixer.computeSpectrum() 方法提取运行时图形和声音数据。

古老的 RTFM(阅读友好手册)建议仍然适用。

Quoting Adobes own public document "Programming Adobe ActionScript 3.0 for Flash", page 700 (chapter 32, heading "Loading content", sub-heading "Content delivered using RTMP servers":

For media loaded from RTMP sources, you cannot use the BitmapData.draw() and
SoundMixer.computeSpectrum() methods to extract run-time graphics and sound data.

The good old RTFM (Read The Friendly Manual) piece of advice still applies.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文