开发者

About computeSpectrum() and RTMP

开发者 https://www.devze.com 2023-04-12 21:59 出处:网络
Just wanted to ask, is it at all possible to create sound spectrum from the data that开发者_如何学Python RTMP server streamed?

Just wanted to ask, is it at all possible to create sound spectrum from the data that开发者_如何学Python RTMP server streamed?

I read this computeSpectrum and it says

"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."

I will not be using FMS so it stays inpossible. Are there any available hacks with php and the server or whatever?


So, after searching I got to an answer and the answer is that there are no hacks with flash itself and actionscript3, i.e you cannot access raw sound data from sound streamed from RTMP server unless you use Client API for FMS server.

I tried with HTTP streaming using apache as a streaming server with php but you cannot use Sound AS3 object to stream, just to load sound file. And also Sound cannot play flv which is my only choice.

If however you use Microphone class to get bytes from the mic, and send them to NetStream object to stream and also to draw with SoundMixer.computeSpectrum(), than yes, but I am not allowed to use Mic :(

Available solutions would be to fake the sound wave.

thanks


in fms streaming room that you get the streaming from, add these codes to main.asc file

application.onConnect = function( p_client)
{
     p_client.audioSampleAccess = "/";
     p_client.videoSampleAccess = "/";
}

i tried it on vod application, it will work on others, it gives both snapshot(bitmap.draw()) and audio spectrum capturing (soundmixer.computespectrum()), it removes the security exeption

good luck

0

精彩评论

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