Taking a snapshot of an flv

Following my last post on 9-Slice items, here comes another nice one on Bitmap.draw() and the security sandbox.
Many people know the solution to this one, but i just found myself looking for it for too long, so here it goes :)

If you want to take a snapshot of a running Video object, you can't, you'll be alerted by the flash player that you are violating
the sandbox security. So how do we do it?
Easy as pie :)

video.attachNetStream( null );
bitmapData.draw( video );
video.attachNetStream ( myNetStreamObject );

Three very simple lines of code but that are hard to come by.

2 Responses to “Taking a snapshot of an flv”

  1. Oleg Andreev Says:

    This RTMP protection trick does not work with 9,0,115,0 Moviestar anymore. Also, this prevents taking snapshot of the any http-streamed FLV (non-protected).

    Thus, RTMP content is not compatible with Papervision3D, for example. Bitter by Adobe.

    http://novemberain.com/2007/12/6/en-moviestar-security-arghh

  2. Tip | Taking a snapshot of an flv « Flash Enabled Blog Says:

    [...] Video I’ve seen this cool tip which let you create a snapshot preview of your flv at Dreaming In Flash. The following 3 simple lines of code, will enabled you to do [...]

Leave a Reply