Archive for the ‘Video’ Category

Client.videoSampleAccess False-Negative

Thursday, June 19th, 2008

In past versions of FMS, developers were barred from accessing raw audio and video data over RTMP and had to resort to a number of hacks and proxies to get around the restriction.  As time went by and new versions of the Flash Player were released, a lot of these loopholes were blocked as well.

With FMS3, there is Client.videoSampleAccess: a property of the Flash Media Server 3 that allows direct access to raw stream data for video use (”audioSampleAccess” for audio).  This can be used for things like producing visual audio spectrums or grabbing a still from a video stream.  It is applied within the onConnect method of the Application server class as demonstrated here:

1
2
appClient.audioSampleAccess = "/";
appClient.videoSampleAccess = "/";

In the above example, the “/” signifies that any streams within the application directory are allowed to be sampled in this way.  You can also specify a semicolon-delimited list of folder names instead if you need to be picky.

Something I came across today and the whole point of this post: even when you have Client.videoSampleAccess set up properly on Flash Media Server, you will still receive a security sandbox violation error #2123 if the stream data is not available.  This can easily happen if you have a timer invoking BitmapData.draw every few milliseconds on loading content.

One way to get around this is using NetStatusEvent.NET_STATUS making sure it reports “NetStream.Buffer.Full” before attempting to access the stream data.  Depending on what you are doing, you can oftentimes check the object recieving the stream data to be sure it is accessible first.  this all seems really obvious now, but threw me for a bit of a loop, initially.

New Short: “Window View”

Sunday, July 1st, 2007

I’ve completed a new short film called “Window View” which can be viewed at The Memoryspiral.


“A scene from within a house- looking out at events in the backyard.”

I’m very happy with both the concept and the final realization. There were some technical considerations I was able to get around with the tools in Premiere CS2… specifically using a garbage mask to remove props I left in frame on one shot- oooops! Haven’t had a look at the new version yet, but do want to give it a try after the full trial is released to see if it speeds up my workflow at all.

Flash Media Encoder is Nice! *mostly*

Thursday, June 7th, 2007

Just had a chance to test the Flash Media Encoder and was pretty impressed. We’ve been using Flash Media Server for our VOD materials but have gone to QuickTime for live events. The main problem with FMS with a live stream is that it will only broadcast using the Spark codec and not VP6. FME changes that by allowing a VP6-encoded stream to be bounced off of FMS and broadcast to client apps.

We tested a stream from FME capturing both a live camera feed and a DVD source and sending them out to FMS for reception by client machines This was only a test to see how well this solution would work in the situation of a live event. Like I mentioned previously, I was very impressed with the quality of result and have no reservations doing a live stream via Flash now. There are a few points-to-note picked up during the process which I will list here:

  • Will not work on Windows Vista :(
  • Seems to be very good at picking up various video and audio sources
  • Could use some advanced preset customization settings

Regarding my last point, there is a “presets.xml” file within the FME application directory that can be edited to allow for custom presets. The only drawback here is that you cannot perform custom mods on-the-fly as you must restart the app to pick up any XML changes.

A great beginning and I’m looking forward to version 1.x… or native support for VP6 in FMS3 so I can write my own capture app.