开发者

Advancing a video frame-by-frame with Flex and Flash Media Server

I've got an Adobe Flash Media Server set up with some streaming videos (.f4v). I've got a Flex app that uses a VideoDisplay component to connect and play videos.

For this particular application, it will be important that users can pause a video and advance it slowly, one click at a time. Frame by frame would be pretty cool, if possible.

Cur开发者_Go百科rently I do this, which works fairly well for values > 0.1s

        protected function reverseFrame(event:MouseEvent):void
        {
            mainVideo.playheadTime -= 0.1; // seconds
        }

        protected function advanceFrame(event:MouseEvent):void
        {
            mainVideo.playheadTime += 0.1; // seconds
        }

I could probably calculate the rough time a frame take (from the metadata I suppose) but I'm not sure if that would be the best way of doing it. Also, sometimes when using small values such as 0.1s, it won't render the next image until I advance again.

I've seen that there are other components for playing Flash media, but I'm not sure if they provide any additional benefit over VideoDisplay.

  • http://www.adobe.com/devnet/video/articles/fmp_player.html
  • http://sourceforge.net/adobe/smp/home/


Flash 10.1 has NetStream.step for this purpose.


If you are flexible on your choice of media streaming server solution, I would suggest you take a look at Wowza Media Server instead of Flash Media Server.

Wowza supports features like fast foward, fast rewind, slow motion. It works by streaming the media at your desired speed eliminating the need to implement the same on the Flex client.

You can take a look at the following code example for the aforementioned functionality:

Wowza Media Server (fast foward, fast rewind, slow motion)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜