FMS3 + ComputeSpectrum

I’ve got an app for streaming live band performances and i’ve also now got a rtmp visualization (albeit this uses Wowza).

So i think why not run both together tonight for the first trial of TheLiveSession.com. Nothing complicated just embed both seperate swf’s in the same html wrapper and modify the visualization to use the live stream coming from my FMS server (instead of the Wowza one) which just means changing where my Netconnection connects to and the NetStream to play.

First things first i test if an MP3 and an FLV from my Influxis FMS 3 server will work just the same as the Wowza demo. It doesn’t initially (but i know why)… So i add the Client.audioSampleAccess and Client.videoSampleAccess properties to “/” so everything in my application can be accessed.

So i restart the server and application to try again… This time i get the expected security error ‘No Policy File’ etc. I’m not yet sure if i can allow access from/to the Influxis server with a config file (i will ask). Anyway i discovered a blog post http://inflagrantedelicto.memoryspiral.com/2008/06/clientvideosampleaccess-false-negative/ that suggests using the NETSTREAM.BUFFER.FULL event to prevent computeSpectrum from running until i have enough data in my buffer to do something with. This is where it gets wierd 😦

Sometimes it works and sometimes it doesn’t. If it works it just works and if not i get numerous security errors as i try to access the data. I can see in all my tests that my buffer is full but regardless Flash makes up it’s own mind…

So that’s one problem! Unreliable code in hand i decide to see if i can get a live stream (one being published by Flash Media Encoder 2.5) to exibit the same behaviour. Unfortunately i quickly discover i’m getting no security errors at all but my stream is playing (as i can hear it). No matter how many times i try, i get the same result – when using a live stream it appears to do absolutely nothing… I switch back to the on demand files stored on the server and they work as they did previously (sometimes i get a visual and sometimes just exceptions).

And so to my questions:

Does anyone have any suggestions why this is so unreliable?

Can i fix it simply by adding a policy file?

Is it possible to access raw data of a live stream?

Is Wowza less secure but ultimately better for this type of application?

Advertisements

3 responses to “FMS3 + ComputeSpectrum

  • mrsteel

    I’ve had some security errors with new Flash Player 10 but not last version, I’ve tested it with Flash Player 9 it worked, fortunately new version of Flash Player 10 solved it (last one that came out)
    so I did nothing and problem went away with new player

    anyway new Flash Player 10 have more restrictive policy, I think FMS is affected

  • Doug

    Joseph Labrecque sent me a message suggesting a temporary hack. Below is the message:

    I’ve had this occur as well – very spotty at times (via FMS3). Something I’ve done to be extra safe is to set a delay before I try and write anything once the buffer full status is triggered. This has worked fairly well – but I’d love to NOT have to mess with such work-arounds.

  • Doug

    @mrsteel – i’m using FP10 😦 but i’m interested to see any examples if you’ve got something. Thanks for the message!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: