开发者

Get decoded frames in Flash (FLVplayback)

I want to know 开发者_StackOverflow社区if it is possible to get the decoded frames from FLVPlayback, or if it is known another alternative to access the decoded frames from a flash player. What I want to do is to manipulate the decoded frames before they get rendered on screen.

The video source could be an RTMP stream or a FLV (F4V) file.

Any hint is welcome :)


In what way do you wish to modify them?

If you need to do any per-pixel operation, and are not using Flash Player 10 (in which case you should look up Pixel Bender), you can use the BitmapData.draw() function to draw your frame into a BitmapData. You can then manipulate the pixels as you wish.

var bmp : BitmapData = new BitmapData(myVideo.width, myVideo.height, false);

// Each frame, do this:
bmp.draw(myVideo);

If you just simply want to apply some sort of generic filter, like blur, you can look up the flash.filters.* classes instead, e.g. BlurFilter, DropShadowFilter or ColorMatrixFilter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜